Yii Framework Forum: Tests for Console Commands - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Tests for Console Commands How do you test console commands via codeception?

#1 User is offline   nima_naraghi 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 183
  • Joined: 15-March 13
  • Location:Iran, Tehran

Posted 14 July 2017 - 05:55 AM

Hi

I have no clue how to create a test for a console command in Yii2 neither unit test nor functional test. Can someone show me an example or a guide please ?

Update:
How can I run a command controller in test environment ?

Cheers
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,067
  • Joined: 17-January 09
  • Location:Russia

Posted 15 July 2017 - 04:10 AM

Check how its done in Yii core tests.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I work on Yii fulltime: https://www.patreon.com/samdark
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users