1--TEST-- 2Games_Chess->addPiece() add white bishop 3--SKIPIF-- 4--FILE-- 5<?php 6require_once dirname(__FILE__) . '/setup.php.inc'; 7$board->addPiece('W', 'P', 'a2'); 8$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 9 'incorrect pawn setup'); 10$board->addPiece('W', 'P', 'a3'); 11$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 12 '1 pawn not the same'); 13$phpunit->assertEquals(array('a3', 'P'), $board->_pieces['WP2'], 14 'incorrect pawn setup'); 15$board->addPiece('W', 'P', 'b2'); 16$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 17 '1 pawn not the same'); 18$phpunit->assertEquals(array('a3', 'P'), $board->_pieces['WP2'], 19 '2 pawn not the same'); 20$phpunit->assertEquals(array('b2', 'P'), $board->_pieces['WP3'], 21 'incorrect pawn setup'); 22$board->addPiece('W', 'P', 'c2'); 23$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 24 '1 pawn not the same'); 25$phpunit->assertEquals(array('a3', 'P'), $board->_pieces['WP2'], 26 '2 pawn not the same'); 27$phpunit->assertEquals(array('b2', 'P'), $board->_pieces['WP3'], 28 '3 pawn not the same'); 29$phpunit->assertEquals(array('c2', 'P'), $board->_pieces['WP4'], 30 'incorrect pawn setup'); 31$board->addPiece('W', 'P', 'd2'); 32$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 33 '1 pawn not the same'); 34$phpunit->assertEquals(array('a3', 'P'), $board->_pieces['WP2'], 35 '2 pawn not the same'); 36$phpunit->assertEquals(array('b2', 'P'), $board->_pieces['WP3'], 37 '3 pawn not the same'); 38$phpunit->assertEquals(array('c2', 'P'), $board->_pieces['WP4'], 39 '4 pawn not the same'); 40$phpunit->assertEquals(array('d2', 'P'), $board->_pieces['WP5'], 41 'incorrect pawn setup'); 42$board->addPiece('W', 'P', 'e2'); 43$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 44 '1 pawn not the same'); 45$phpunit->assertEquals(array('a3', 'P'), $board->_pieces['WP2'], 46 '2 pawn not the same'); 47$phpunit->assertEquals(array('b2', 'P'), $board->_pieces['WP3'], 48 '3 pawn not the same'); 49$phpunit->assertEquals(array('c2', 'P'), $board->_pieces['WP4'], 50 '4 pawn not the same'); 51$phpunit->assertEquals(array('d2', 'P'), $board->_pieces['WP5'], 52 '5 pawn not the same'); 53$phpunit->assertEquals(array('e2', 'P'), $board->_pieces['WP6'], 54 'incorrect pawn setup'); 55$board->addPiece('W', 'P', 'f2'); 56$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 57 '1 pawn not the same'); 58$phpunit->assertEquals(array('a3', 'P'), $board->_pieces['WP2'], 59 '2 pawn not the same'); 60$phpunit->assertEquals(array('b2', 'P'), $board->_pieces['WP3'], 61 '3 pawn not the same'); 62$phpunit->assertEquals(array('c2', 'P'), $board->_pieces['WP4'], 63 '4 pawn not the same'); 64$phpunit->assertEquals(array('d2', 'P'), $board->_pieces['WP5'], 65 '5 pawn not the same'); 66$phpunit->assertEquals(array('e2', 'P'), $board->_pieces['WP6'], 67 '6 pawn not the same'); 68$phpunit->assertEquals(array('f2', 'P'), $board->_pieces['WP7'], 69 'incorrect pawn setup'); 70$board->addPiece('W', 'P', 'g2'); 71$phpunit->assertEquals(array('a2', 'P'), $board->_pieces['WP1'], 72 '1 pawn not the same'); 73$phpunit->assertEquals(array('a3', 'P'), $board->_pieces['WP2'], 74 '2 pawn not the same'); 75$phpunit->assertEquals(array('b2', 'P'), $board->_pieces['WP3'], 76 '3 pawn not the same'); 77$phpunit->assertEquals(array('c2', 'P'), $board->_pieces['WP4'], 78 '4 pawn not the same'); 79$phpunit->assertEquals(array('d2', 'P'), $board->_pieces['WP5'], 80 '5 pawn not the same'); 81$phpunit->assertEquals(array('e2', 'P'), $board->_pieces['WP6'], 82 '6 pawn not the same'); 83$phpunit->assertEquals(array('f2', 'P'), $board->_pieces['WP7'], 84 '7 pawn not the same'); 85$phpunit->assertEquals(array('g2', 'P'), $board->_pieces['WP8'], 86 'incorrect pawn setup'); 87echo 'tests done'; 88?> 89--EXPECT-- 90tests done