Skip to content

Commit 2c7fde2

Browse files
authored
Phpunit wrapper (#4817)
* changed build process for phar * Switched to use phpunit-wrapper * loading shim * fixed REST * Switched to use phpunit-wrapper * Fixed tests * Switched to use phpunit-wrapper * Fixed zend expressive - to not install dev deps * Switched to use phpunit-wrapper * no dev dependencies for project * Fixed laravel event tests * fixed Laravel event mocking * Removed PHP 5.4 and PHP 5.5 tests from Travis CI
1 parent 8265029 commit 2c7fde2

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

tests/data/app/db

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a:0:{}
1+
a:1:{s:6:"params";a:0:{}}

tests/unit/Codeception/Module/PhpBrowserRestTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testValidJson()
7171

7272
public function testInvalidJson()
7373
{
74-
$this->setExpectedException('PHPUnit_Framework_ExpectationFailedException');
74+
$this->setExpectedException('PHPUnit\Framework\ExpectationFailedException');
7575
$this->setStubResponse('{xxx = yyy}');
7676
$this->module->seeResponseIsJson();
7777
}
@@ -87,7 +87,7 @@ public function testValidXml()
8787

8888
public function testInvalidXml()
8989
{
90-
$this->setExpectedException('PHPUnit_Framework_ExpectationFailedException');
90+
$this->setExpectedException('PHPUnit\Framework\ExpectationFailedException');
9191
$this->setStubResponse('<xml><name>John</surname></xml>');
9292
$this->module->seeResponseIsXml();
9393
}
@@ -315,7 +315,7 @@ public function testSessionHeaderBackup()
315315

316316
protected function shouldFail()
317317
{
318-
$this->setExpectedException('PHPUnit_Framework_AssertionFailedError');
318+
$this->setExpectedException('PHPUnit\Framework\AssertionFailedError');
319319
}
320320

321321
public function testGrabFromCurrentUrl()

tests/unit/Codeception/Module/PhpBrowserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ public function testClickSelectsClickableElementFromMatchesUsingCssLocator()
608608
}
609609

610610
/**
611-
* @expectedException PHPUnit_Framework_AssertionFailedError
611+
* @expectedException PHPUnit\Framework\AssertionFailedError
612612
*/
613613
public function testClickingOnButtonOutsideFormDoesNotCauseFatalError()
614614
{

tests/unit/Codeception/Module/TestsForWeb.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
abstract class TestsForWeb extends \Codeception\TestCase\Test
11+
abstract class TestsForWeb extends \Codeception\Test\Unit
1212
{
1313
/**
1414
* @var \Codeception\Module\PhpBrowser
@@ -92,7 +92,7 @@ public function testSeeIsCaseInsensitiveForUnicodeText()
9292

9393
public function testDontSeeIsCaseInsensitiveForUnicodeText()
9494
{
95-
$this->setExpectedException("PHPUnit_Framework_AssertionFailedError");
95+
$this->setExpectedException("PHPUnit\Framework\AssertionFailedError");
9696
$this->module->amOnPage('/info');
9797
$this->module->dontSee('ссылочка');
9898
}
@@ -128,7 +128,7 @@ public function testDontSeeLink()
128128
public function testSeeLinkFailsIfTextDoesNotMatch()
129129
{
130130
$this->setExpectedException(
131-
'PHPUnit_Framework_AssertionFailedError',
131+
'PHPUnit\Framework\AssertionFailedError',
132132
"No links containing text 'Codeception' were found in page /external_url"
133133
);
134134
$this->module->amOnPage('/external_url');
@@ -138,7 +138,7 @@ public function testSeeLinkFailsIfTextDoesNotMatch()
138138
public function testSeeLinkFailsIfHrefDoesNotMatch()
139139
{
140140
$this->setExpectedException(
141-
'PHPUnit_Framework_AssertionFailedError',
141+
'PHPUnit\Framework\AssertionFailedError',
142142
"No links containing text 'Next' and URL '/fsdfsdf/' were found in page /external_url"
143143
);
144144
$this->module->amOnPage('/external_url');
@@ -148,7 +148,7 @@ public function testSeeLinkFailsIfHrefDoesNotMatch()
148148
public function testDontSeeLinkFailsIfTextMatches()
149149
{
150150
$this->setExpectedException(
151-
'PHPUnit_Framework_AssertionFailedError',
151+
'PHPUnit\Framework\AssertionFailedError',
152152
"Link containing text 'Next' was found in page /external_url"
153153
);
154154
$this->module->amOnPage('/external_url');
@@ -158,7 +158,7 @@ public function testDontSeeLinkFailsIfTextMatches()
158158
public function testDontSeeLinkFailsIfTextAndUrlMatches()
159159
{
160160
$this->setExpectedException(
161-
'PHPUnit_Framework_AssertionFailedError',
161+
'PHPUnit\Framework\AssertionFailedError',
162162
"Link containing text 'Next' and URL 'http://codeception.com/' was found in page /external_url"
163163
);
164164
$this->module->amOnPage('/external_url');
@@ -174,7 +174,7 @@ public function testSeeLinkMatchesRelativeLink()
174174
public function testDontSeeLinkMatchesRelativeLink()
175175
{
176176
$this->setExpectedException(
177-
'PHPUnit_Framework_AssertionFailedError',
177+
'PHPUnit\Framework\AssertionFailedError',
178178
"Link containing text 'Sign in!' and URL '/login' was found in page /info"
179179
);
180180
$this->module->amOnPage('/info');
@@ -611,7 +611,7 @@ public function testSeeInFormFields()
611611
public function testSeeInFormFieldsFails()
612612
{
613613
$this->module->amOnPage('/form/field_values');
614-
$this->setExpectedException("PHPUnit_Framework_AssertionFailedError");
614+
$this->setExpectedException("PHPUnit\Framework\AssertionFailedError");
615615
$params = [
616616
'radio1' => 'something I should not see',
617617
'checkbox1' => true,
@@ -649,7 +649,7 @@ public function testDontSeeInFormFields()
649649
public function testDontSeeInFormFieldsFails()
650650
{
651651
$this->module->amOnPage('/form/field_values');
652-
$this->setExpectedException("PHPUnit_Framework_AssertionFailedError");
652+
$this->setExpectedException("PHPUnit\Framework\AssertionFailedError");
653653
$params = [
654654
'checkbox[]' => [
655655
'wont see this anyway',
@@ -777,7 +777,7 @@ public function testSeeElementOnPage()
777777
// regression test. https://github.com/Codeception/Codeception/issues/587
778778
public function testSeeElementOnPageFails()
779779
{
780-
$this->setExpectedException("PHPUnit_Framework_AssertionFailedError");
780+
$this->setExpectedException("PHPUnit\Framework\AssertionFailedError");
781781
$this->module->amOnPage('/form/field');
782782
$this->module->dontSeeElement('input[name=name]');
783783
}
@@ -1197,7 +1197,7 @@ public function testSelectTwoSubmitsByCSS()
11971197

11981198
protected function shouldFail()
11991199
{
1200-
$this->setExpectedException('PHPUnit_Framework_AssertionFailedError');
1200+
$this->setExpectedException('PHPUnit\Framework\AssertionFailedError');
12011201
}
12021202

12031203
/**

0 commit comments

Comments
 (0)