/**
  * @return void
  */
 public function test_function()
 {
     // prepare
     $this->setExpectedException('\\UnexpectedValueException', 'Not initialized');
     // invoke logic & test
     Base::getInstance();
 }
示例#2
0
 /**
  * @return void
  */
 public function test_function()
 {
     // prepare
     $this->setExpectedException('\\DbMockLibrary\\Exceptions\\AlreadyInitializedException', 'DbMockLibrary\\Base has already been initialized');
     // invoke logic
     Base::init([]);
     Base::init([]);
 }
示例#3
0
 /**
  * @return void
  */
 public function test_function()
 {
     // invoke logic
     Base::init();
     // prepare
     $reflection = new \ReflectionClass('\\DbMockLibrary\\Base');
     $staticProperties = $reflection->getStaticProperties();
     // test
     $this->assertInstanceOf('\\DbMockLibrary\\Base', $staticProperties['instance']);
 }