some explanations

This commit is contained in:
Trismegiste
2013-08-24 00:24:30 +02:00
parent 1d04c20f25
commit 99c181f975
3 changed files with 16 additions and 1 deletions

View File

@@ -18,6 +18,9 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
$this->observer = new UserObserver();
}
/**
* Tests the notification
*/
public function testNotify()
{
$this->expectOutputString('DesignPatterns\Observer\User has been updated');
@@ -27,6 +30,9 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
$subject->property = 123;
}
/**
* Tests the subscribing
*/
public function testAttachDetach()
{
$subject = new User();
@@ -37,6 +43,9 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
$this->assertAttributeEmpty('_observers', $subject);
}
/**
* Tests the update() invocation on a mockup
*/
public function testUpdateCalling()
{
$subject = new User();