Skip to content

Commit f02c089

Browse files
committed
Call bin/phpunit, add verbose to phpunit and re-use response object
1 parent 9476a23 commit f02c089

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"check": "phpcs --standard=PSR2 src test",
6363
"test": [
6464
"@check",
65-
"phpunit"
65+
"bin/phpunit"
6666
]
6767
},
6868
"conflict": {

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<phpunit bootstrap="./vendor/autoload.php" colors="true">
2+
<phpunit bootstrap="./vendor/autoload.php" colors="true" verbose="true">
33
<php>
4-
<server name="KERNEL_CLASS" value="App\Kernel" />
4+
<server name="KERNEL_CLASS" value="App\Kernel"/>
55
<server name="APP_ENV" value="test" />
66
<server name="APP_DEBUG" value="false"/>
77
</php>

test/Model/BasicContainerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ public function testGetTurtle()
4848
$etag = $response->headers->get('etag');
4949

5050
$this->client->request('GET', "/", [], [], ['HTTP_ACCEPT' => $expected_mime]);
51-
52-
$this->assertEquals(200, $this->client->getResponse()->getStatusCode(), "GET should be allowed a second time.");
53-
$this->assertTrue($this->client->getResponse()->headers->has("etag"), "Missing Etag header.");
54-
$this->assertEquals($etag, $this->client->getResponse()->headers->get('etag'), "Etags don't match.");
51+
$response = $this->client->getResponse();
52+
$this->assertEquals(200, $response->getStatusCode(), "GET should be allowed a second time.");
53+
$this->assertTrue($response->headers->has("etag"), "Missing Etag header.");
54+
$this->assertEquals($etag, $response->headers->get('etag'), "Etags don't match.");
5555

5656
$subject = "http://localhost/";
5757
$contains = "http://www.w3.org/ns/ldp#contains";

0 commit comments

Comments
 (0)