Skip to content

Commit

Permalink
Adding Session::bind() test fixes #3164
Browse files Browse the repository at this point in the history
  • Loading branch information
BRMatt committed Sep 5, 2010
1 parent 5fb8ebc commit 215e585
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/kohana/SessionTest.php
Expand Up @@ -113,6 +113,27 @@ public function test_constructor_loads_session_with_session_id()
$session->__construct($config, $session_id);
}

/**
* Calling $session->bind() should allow you to bind a variable
* to a session variable
*
* @test
* @covers Session::bind
* @ticket 3164
*/
public function test_bind_actually_binds_variable()
{
$session = $this->getMockForAbstractClass('Session');

$var = 'asd';

$session->bind('our_var', $var);

$var = 'foobar';

$this->assertSame('foobar', $session->get('our_var'));
}


/**
* When a session is initially created it should have no data
Expand Down

0 comments on commit 215e585

Please sign in to comment.