|
|
@@ -109,12 +109,17 @@ class FlashComponentTest extends TestCase
|
|
|
$result = $this->Session->read('Flash.foobar');
|
|
|
$this->assertEquals($expected, $result);
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ public function testDuplicateIgnored()
|
|
|
+ {
|
|
|
+ $this->assertNull($this->Session->read('Flash.flash'));
|
|
|
|
|
|
$this->Flash->config('duplicate', false);
|
|
|
$this->Flash->set('This test message should appear once only');
|
|
|
$this->Flash->set('This test message should appear once only');
|
|
|
- $result = array_slice($this->Session->read('Flash.flash'), -2);
|
|
|
- $this->assertNotEquals($result[0], $result[1]);
|
|
|
+ $result = $this->Session->read('Flash.flash');
|
|
|
+ $this->assertCount(1, $result);
|
|
|
}
|
|
|
|
|
|
/**
|