예제 #1
0
 public function testSetAndGetLogger()
 {
     $key = Registry::LOGGER;
     $object = new \StdClass();
     Registry::set($key, $object);
     $actual = Registry::get($key);
     $this->assertEquals($object, $actual);
     $this->assertInstanceOf('StdClass', $actual);
 }
예제 #2
0
 public function testSetAndGetLogger()
 {
     Registry::set(Registry::LOGGER, new \StdClass());
     $logger = Registry::get(Registry::LOGGER);
     $this->assertInstanceOf('StdClass', $logger);
 }
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testThrowsExceptionWhenTryingToSetInvalidKey()
 {
     Registry::set('foobar', new \stdClass());
 }