Ejemplo n.º 1
0
 /**
  * @covers Cradle\Handlebars\HandlebarsData::pop
  */
 public function testPop()
 {
     $instance = $this->object->push(array('comment1' => 'this is good', 'comment2' => 'this is great', 'comment3' => 'this is nice'))->push(array('comment4' => 'this is cool', 'comment5' => 'this is awesome', 'comment6' => 'this is epic'))->pop();
     $this->assertInstanceOf('Cradle\\Handlebars\\HandlebarsData', $instance);
     $this->assertEquals('Hello World', $this->object->find('../product_title'));
     $this->assertEquals('this is good', $this->object->find('comment1'));
     $this->assertEquals('this is great', $this->object->find('../product_comments.comment2'));
     $this->assertEquals('Hello World', $this->object->find('./../product_title'));
     $this->assertEquals('this is good', $this->object->find('./comment1'));
     $this->assertEquals('this is great', $this->object->find('.././product_comments.comment2'));
 }