Example #1
0
 function testUpdate()
 {
     $name = "Foot and feet";
     $test_brand = new Brand($name);
     $test_brand->save();
     $new_name = "Foot peddler";
     $test_brand->updateName($new_name);
     $this->assertEquals($new_name, $test_brand->getName());
 }
Example #2
0
 function test_updateName()
 {
     //Arrange
     $name = "Nike";
     $website = "http://www.nike.com";
     $test_brand = new Brand($name, $website);
     $test_brand->save();
     //Act
     $new_name = "Reebok";
     $test_brand->updateName($new_name);
     //Assert
     $result = Brand::getAll();
     $this->assertEquals($new_name, $result[0]->getName());
 }