Use assertNotSame() instead of assertTrue($result !== false)

This commit is contained in:
Marek Władysz 2014-10-26 14:19:19 +01:00
parent 090e85a5a4
commit 65cb186652

View file

@ -1219,7 +1219,7 @@ class CakeResponseTest extends CakeTestCase {
$result = $response->send(); $result = $response->send();
$output = ob_get_clean(); $output = ob_get_clean();
$this->assertEquals("/* this is the test asset css file */\n", $output); $this->assertEquals("/* this is the test asset css file */\n", $output);
$this->assertTrue($result !== false); $this->assertNotSame($result, false);
} }
/** /**
@ -1276,7 +1276,7 @@ class CakeResponseTest extends CakeTestCase {
$result = $response->send(); $result = $response->send();
$output = ob_get_clean(); $output = ob_get_clean();
$this->assertEquals("some_key = some_value\nbool_key = 1\n", $output); $this->assertEquals("some_key = some_value\nbool_key = 1\n", $output);
$this->assertTrue($result !== false); $this->assertNotSame($result, false);
if ($currentUserAgent !== null) { if ($currentUserAgent !== null) {
$_SERVER['HTTP_USER_AGENT'] = $currentUserAgent; $_SERVER['HTTP_USER_AGENT'] = $currentUserAgent;
} }
@ -1340,7 +1340,7 @@ class CakeResponseTest extends CakeTestCase {
$result = $response->send(); $result = $response->send();
$output = ob_get_clean(); $output = ob_get_clean();
$this->assertEquals("some_key = some_value\nbool_key = 1\n", $output); $this->assertEquals("some_key = some_value\nbool_key = 1\n", $output);
$this->assertTrue($result !== false); $this->assertNotSame($result, false);
if ($currentUserAgent !== null) { if ($currentUserAgent !== null) {
$_SERVER['HTTP_USER_AGENT'] = $currentUserAgent; $_SERVER['HTTP_USER_AGENT'] = $currentUserAgent;
} }
@ -1406,7 +1406,7 @@ class CakeResponseTest extends CakeTestCase {
$result = $response->send(); $result = $response->send();
$output = ob_get_clean(); $output = ob_get_clean();
$this->assertEquals("some_key = some_value\nbool_key = 1\n", $output); $this->assertEquals("some_key = some_value\nbool_key = 1\n", $output);
$this->assertTrue($result !== false); $this->assertNotSame($result, false);
if ($currentUserAgent !== null) { if ($currentUserAgent !== null) {
$_SERVER['HTTP_USER_AGENT'] = $currentUserAgent; $_SERVER['HTTP_USER_AGENT'] = $currentUserAgent;
} }
@ -1676,7 +1676,7 @@ class CakeResponseTest extends CakeTestCase {
$output = ob_get_clean(); $output = ob_get_clean();
$this->assertEquals(206, $response->statusCode()); $this->assertEquals(206, $response->statusCode());
$this->assertEquals("is the test asset ", $output); $this->assertEquals("is the test asset ", $output);
$this->assertTrue($result !== false); $this->assertNotSame($result, false);
} }
/** /**
@ -1814,7 +1814,7 @@ class CakeResponseTest extends CakeTestCase {
$output = ob_get_clean(); $output = ob_get_clean();
$this->assertEquals(206, $response->statusCode()); $this->assertEquals(206, $response->statusCode());
$this->assertEquals("is the test asset ", $output); $this->assertEquals("is the test asset ", $output);
$this->assertTrue($result !== false); $this->assertNotSame($result, false);
} }
/** /**