@@ -4,12 +4,12 @@ class AssertsTest extends PHPUnit_Framework_TestCase
44 public function testAsserts ()
55 {
66 $ module = new \Codeception \Module \Asserts (make_container ());
7- $ module ->assertEquals (1 ,1 );
8- $ module ->assertContains (1 ,[1 ,2 ]);
9- $ module ->assertSame (1 ,1 );
7+ $ module ->assertEquals (1 , 1 );
8+ $ module ->assertContains (1 , [1 , 2 ]);
9+ $ module ->assertSame (1 , 1 );
1010 $ module ->assertNotSame (1 , '1 ' );
11- $ module ->assertRegExp ('/^[\d]$/ ' ,'1 ' );
12- $ module ->assertNotRegExp ('/^[a-z]$/ ' ,'1 ' );
11+ $ module ->assertRegExp ('/^[\d]$/ ' , '1 ' );
12+ $ module ->assertNotRegExp ('/^[a-z]$/ ' , '1 ' );
1313 $ module ->assertEmpty ([]);
1414 $ module ->assertNotEmpty ([1 ]);
1515 $ module ->assertNull (null );
@@ -28,9 +28,15 @@ public function testAsserts()
2828 public function testExceptions ()
2929 {
3030 $ module = new \Codeception \Module \Asserts (make_container ());
31- $ module ->expectException ('Exception ' , function () { throw new Exception ; });
32- $ module ->expectException (new Exception ('here ' ), function () { throw new Exception ('here ' ); });
33- $ module ->expectException (new Exception ('here ' , 200 ), function () { throw new Exception ('here ' , 200 ); });
31+ $ module ->expectException ('Exception ' , function () {
32+ throw new Exception ;
33+ });
34+ $ module ->expectException (new Exception ('here ' ), function () {
35+ throw new Exception ('here ' );
36+ });
37+ $ module ->expectException (new Exception ('here ' , 200 ), function () {
38+ throw new Exception ('here ' , 200 );
39+ });
3440 }
3541
3642 /**
@@ -39,7 +45,8 @@ public function testExceptions()
3945 public function testExceptionFails ()
4046 {
4147 $ module = new \Codeception \Module \Asserts (make_container ());
42- $ module ->expectException (new Exception ('here ' , 200 ), function () { throw new Exception ('here ' , 2 ); });
48+ $ module ->expectException (new Exception ('here ' , 200 ), function () {
49+ throw new Exception ('here ' , 2 );
50+ });
4351 }
44-
4552}
0 commit comments