77class RoboFile extends \Robo \Tasks
88{
99 // define public methods as commands
10- public function prepare ()
10+ public function prepareDependencies ()
1111 {
1212 $ config = json_decode (file_get_contents (__DIR__ . '/composer.json ' ), true );
1313
1414 $ config ['name ' ] = 'codeception/phpunit-wrapper-test ' ;
1515 $ config ['require-dev ' ]['codeception/codeception ' ] = getenv ('CODECEPTION_VERSION ' );
16+ $ config ['require-dev ' ]['codeception/module-asserts ' ] = 'dev-master ' ;
17+ $ config ['require-dev ' ]['codeception/module-cli ' ] = '* ' ;
18+ $ config ['require-dev ' ]['codeception/module-db ' ] = '* ' ;
19+ $ config ['require-dev ' ]['codeception/module-filesystem ' ] = '* ' ;
20+ $ config ['require-dev ' ]['codeception/module-phpbrowser ' ] = '* ' ;
21+ $ config ['require-dev ' ]['codeception/util-universalframework ' ] = '* ' ;
1622 $ config ['replace ' ] = ['codeception/phpunit-wrapper ' => '* ' ];
1723
18- file_put_contents (__DIR__ . '/composer.json ' , json_encode ($ config ));
24+ file_put_contents (__DIR__ . '/composer.json ' , json_encode ($ config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ));
1925 }
2026
21- public function test ( $ params )
27+ public function prepareTests ( )
2228 {
23- return $ this ->taskExec (__DIR__ . '/vendor/bin/codecept run ' . $ params )
24- -> dir (__DIR__ .'/vendor/codeception/codeception ' )
25- -> run ( );
29+ $ this ->_copyDir (__DIR__ . '/vendor/codeception/codeception/tests ' , __DIR__ . ' /tests ' );
30+ $ this -> _copy (__DIR__ . '/vendor/codeception/codeception/codeception.yml ' , __DIR__ . ' /codeception.yml ' );
31+ $ this -> _symlink ( __DIR__ . ' /vendor/bin/codecept ' , __DIR__ . ' /codecept ' );
2632 }
27- }
33+
34+ public function prepareTestAutoloading ()
35+ {
36+ $ config = json_decode (file_get_contents (__DIR__ . '/composer.json ' ), true );
37+ $ config ['autoload-dev ' ] = [
38+ 'classmap ' => [
39+ 'tests/cli/_steps ' ,
40+ 'tests/data/DummyClass.php ' ,
41+ 'tests/data/claypit/tests/_data '
42+ ]
43+ ];
44+ file_put_contents (__DIR__ . '/composer.json ' , json_encode ($ config , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ));
45+ }
46+ }
0 commit comments