コード例 #1
0
 protected function tearDown()
 {
     Book::deleteAll();
     Copy::deleteAll();
     Author::deleteAll();
     Patron::deleteAll();
 }
コード例 #2
0
ファイル: CopyTest.php プロジェクト: nathanhwyoung/Library-2
 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);
 }
コード例 #3
0
ファイル: CopyTest.php プロジェクト: kevintokheim/Library
 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);
 }
コード例 #4
0
ファイル: CopyTest.php プロジェクト: bborealis/library
 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);
 }
コード例 #5
0
ファイル: PatronTest.php プロジェクト: bborealis/library-1
 protected function tearDown()
 {
     Patron::deleteAll();
     Copy::deleteAll();
     Checkout::deleteAll();
 }
コード例 #6
0
ファイル: CheckoutTest.php プロジェクト: kevintokheim/Library
 protected function tearDown()
 {
     Copy::deleteAll();
     Book::deleteAll();
     Checkout::deleteAll();
 }
コード例 #7
0
ファイル: CopyTest.php プロジェクト: umamiMike/Library
 protected function tearDown()
 {
     Book::deleteAll();
     Copy::deleteAll();
 }
コード例 #8
0
ファイル: CopyTest.php プロジェクト: jlbethel/library-1
 protected function tearDown()
 {
     Copy::deleteAll();
     Book::deleteAll();
     Patron::deleteAll();
 }
コード例 #9
0
ファイル: CopyTest.php プロジェクト: kevintokheim/Liberry
 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);
 }