getNestLevel() public méthode

public getNestLevel ( ) : integer
Résultat integer
Exemple #1
0
 /**
  * @covers DataSift\Storyplayer\PlayerLib\Action_LogItem::startAction
  * @covers DataSift\Storyplayer\PlayerLib\Action_LogItem::getIsOpen
  */
 public function testCanSeeIfAStartedActionIsOpen()
 {
     // ----------------------------------------------------------------
     // setup your test
     // the message we are logging
     $msg = "This is a test message";
     // our DI container
     $i = new Injectables();
     // our mocked output object
     $i->output = Mockery::mock("DataSift\\Storyplayer\\Output");
     $i->output->shouldReceive('logPhaseActivity')->once()->with($msg, null);
     // our real data formatter
     $i->dataFormatter = new DataFormatter();
     // our unit under test
     $obj = new Action_LogItem($i, 1);
     $this->assertNull($obj->getStartTime());
     // ----------------------------------------------------------------
     // perform the change
     // let's get this action started
     $obj->startAction($msg);
     // ----------------------------------------------------------------
     // test the results
     $this->assertTrue($obj instanceof Action_LogItem);
     $this->assertEquals(1, $obj->getNestLevel());
     $this->assertTrue($obj->getIsOpen());
     Mockery::close();
 }