protected function tearDown()
 {
     Book::deleteAll();
     Copy::deleteAll();
     Author::deleteAll();
     Patron::deleteAll();
 }
Exemple #2
0
 function testDeleteAll()
 {
     $title = "Three Blind Mice";
     $test_book = new Book($title);
     $test_book->save();
     $amount = 3;
     $book_id = $test_book->getId();
     $test_copy = new Copy($amount, $book_id);
     $test_copy->save();
     Copy::deleteAll();
     $result = Copy::getAll();
     $this->assertEquals([], $result);
 }
Exemple #3
0
 function testDeleteAll()
 {
     //Arrange
     $book_id = 1;
     $test_copy = new Copy($book_id);
     $test_copy->save();
     $book_id2 = 2;
     $test_copy2 = new Copy($book_id2);
     $test_copy2->save();
     //Act
     Copy::deleteAll();
     $result = Copy::getAll();
     //Assert
     $this->assertEquals([], $result);
 }
Exemple #4
0
 function testDeleteAll()
 {
     //Arrange
     $due_date = '2015-10-10';
     $book_id = 1;
     $id = 1;
     $test_copy = new Copy($due_date, $book_id, $id);
     $test_copy->save();
     $due_date2 = '2015-11-11';
     $book_id2 = 2;
     $id2 = 2;
     $test_copy2 = new Copy($due_date2, $book_id2, $id2);
     $test_copy2->save();
     //Act
     Copy::deleteAll();
     $result = Copy::getAll();
     //Assert
     $this->assertEquals([], $result);
 }
Exemple #5
0
 protected function tearDown()
 {
     Patron::deleteAll();
     Copy::deleteAll();
     Checkout::deleteAll();
 }
 protected function tearDown()
 {
     Copy::deleteAll();
     Book::deleteAll();
     Checkout::deleteAll();
 }
Exemple #7
0
 protected function tearDown()
 {
     Book::deleteAll();
     Copy::deleteAll();
 }
Exemple #8
0
 protected function tearDown()
 {
     Copy::deleteAll();
     Book::deleteAll();
     Patron::deleteAll();
 }
Exemple #9
0
 function test_deleteAll()
 {
     //Arrange
     $available = true;
     $book_id = 4;
     $test_copy = new Copy($available, $book_id);
     $test_copy->save();
     //Act
     $test_copy->deleteAll();
     $result = Copy::getAll();
     //Assert
     $this->assertEquals([], $result);
 }