File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88// download composer
99
10- if (!file_exists ('composer.phar ' )) {
11- file_put_contents ('composer.phar ' , file_get_contents ('http://getcomposer.org/installer ' ));
12- }
13- system ('php composer.phar update ' );
10+ // if (!file_exists('composer.phar')) {
11+ // file_put_contents('composer.phar', file_get_contents('http://getcomposer.org/installer'));
12+ // }
13+ // system('php composer.phar update');
1414
15+ chdir ($ root );
1516$ compiler = new Compiler ();
1617$ compiler ->compile ();
1718
18- @unlink ('package/codecept.phar ' );
19-
2019if (file_exists ('codecept.phar.gz ' )) {
2120 chmod ('codecept.phar.gz ' , 755 );
2221 copy ('codecept.phar.gz ' , 'package/codecept.phar ' );
2322} else {
24- chmod ('codecept.phar ' , 755 );
2523 copy ('codecept.phar ' , 'package/codecept.phar ' );
24+ @exec ('chmod 755 package/codecept.phar ' );
2625}
2726@unlink ('codecept.phar ' );
2827@unlink ('codecept.phar.gz ' );
2928
30- chmod ('package/codecept.phar ' , 755 );
31-
3229echo system ('php package/codecept.phar ' );
3330
34- echo "PHAR build finished " ;
31+ echo "\n PHAR build finished\n\n " ;
Original file line number Diff line number Diff line change 44 * Codeception CLI
55 */
66
7- if (!class_exists ('UniversalClassLoader ' )) {
8- $ bootstrap_folder = (is_dir (__DIR__ . '/src ' ))
9- ? dirname (__FILE__ )
10- : 'Codeception ' ;
11-
12- require_once $ bootstrap_folder .'/autoload.php ' ;
13- }
7+ require_once dirname (__FILE__ ).'/autoload.php ' ;
148
159if (isset ($ argv [1 ])) {
1610 if (!in_array ('run ' , $ argv )) {
Original file line number Diff line number Diff line change 22<?php
33Phar::mapPhar ();
44
5- chdir (__DIR__ );
6-
75require_once 'phar://codecept.phar/autoload.php ' ;
86
97require_once 'phar://codecept.phar/codecept ' ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function _before(\Codeception\TestCase $test)
5252 if ($ this ->hasModule ('Symfony2 ' )) {
5353 $ kernel = $ this ->getModule ('Symfony2 ' )->kernel ;
5454 if ($ kernel ->getContainer ()->has ('doctrine ' )) {
55- self ::$ em = $ kernel ->getContainer ()->get ('doctrine ' )-> getEntityManager ( );
55+ self ::$ em = $ kernel ->getContainer ()->get ('doctrine.orm.entity_manager ' );
5656 }
5757 }
5858 }
Original file line number Diff line number Diff line change 11<?php
22namespace Codeception \Module ;
3+
34use Codeception \Exception \ModuleRequire ;
45use Symfony \Component \Finder \Finder ;
6+ use Symfony \Component \HttpKernel \Exception \FlattenException ;
7+ use Symfony \Component \HttpKernel \Exception \HttpException ;
8+ use Symfony \Component \HttpFoundation \Response ;
59
610/**
711 * This module uses Symfony2 Crawler and HttpKernel to emulate requests and get response.
@@ -60,10 +64,6 @@ public function _initialize() {
6064 require_once $ cache ;
6165 $ this ->kernelClass = $ this ->getKernelClass ();
6266 $ this ->kernel = new $ this ->kernelClass ('test ' , true );
63- $ this ->kernel ->boot ();
64- if (!($ this ->kernel ->getContainer () instanceof \Symfony \Component \DependencyInjection \ContainerInterface)) {
65- throw new ModuleRequire (__CLASS__ ,"Wrong container in Kernel (not implements ContainerInterface) " );
66- }
6767 }
6868
6969 public function _before (\Codeception \TestCase $ test ) {
You can’t perform that action at this time.
0 commit comments