Skip to content
Permalink
Browse files

Make tests more strict.

assertEmpty() will also pass on 0, false, null and '' which is not what
we want. Matching exactly to '' is more what we're looking for.
  • Loading branch information...
markstory committed Dec 18, 2015
1 parent 4a71ab9 commit 88f28f8a60d3dddb78fcd49a730e9fb33bd1311b
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/TestCase/Network/Session/DatabaseSessionTest.php
@@ -130,7 +130,7 @@ public function testRead()
$this->assertEquals($expected, $result);
$result = $this->storage->read('made up value');
$this->assertEmpty($result);
$this->assertSame('', $result);
}
/**
@@ -143,7 +143,7 @@ public function testDestroy()
$this->storage->write('foo', 'Some value');
$this->assertTrue($this->storage->destroy('foo'), 'Destroy failed');
$this->assertEmpty($this->storage->read('foo'), 'Value still present.');
$this->assertSame('', $this->storage->read('foo'), 'Value still present.');
}
/**
@@ -161,7 +161,7 @@ public function testGc()
sleep(1);
$storage->gc(0);
$this->assertEmpty($storage->read('foo'));
$this->assertSame('', $storage->read('foo'));
}
/**

0 comments on commit 88f28f8

Please sign in to comment.
You can’t perform that action at this time.