function test_getItem()
 {
     //Arrange
     $item = 'action figure';
     $test_Inventory = new Inventory($item);
     //Act
     $result = $test_Inventory->getItem();
     //Assert
     $this->assertEquals($item, $result);
 }
Esempio n. 2
0
 function test_find()
 {
     $item = "POGs";
     $item2 = "Pokemon Cards";
     $test_item = new Inventory($item);
     $test_item->save();
     $test_item2 = new Inventory($item2);
     $test_item2->save();
     $search_item = $test_item->getItem();
     $result = Inventory::find($search_item);
     $this->assertEquals($test_item, $result);
 }
Esempio n. 3
0
 /**
  * @covers rvilbrandt\gamebook\Model\Gamebook\Inventory::getItem
  */
 public function testGetItem()
 {
     $this->object->addItem("test", new Inventory\Item());
     $this->assertInstanceOf("rvilbrandt\\gamebook\\Model\\Inventory\\Item", $this->object->getItem("test"));
 }