1--TEST-- 2Games_Chess_Crazyhouse->moveSAN() place piece on invalid square 3--SKIPIF-- 4--FILE-- 5<?php 6require_once dirname(__FILE__) . '/setup.php.inc'; 7$board->resetGame(); 8$err = $board->moveSAN('P@d5'); 9$phpunit->assertErrors(array( 10 array('package' => 'PEAR_Error', 'message' => 'There are no captured Black Pawns available to place') 11), 'error 1'); 12$phpunit->assertEquals(GAMES_CHESS_ERROR_NOPIECES_TOPLACE, $err->getCode(), 'err 1'); 13$phpunit->assertEquals('pear_error', strtolower(get_class($err)), 'no error'); 14$board->moveSAN('e4'); 15$board->moveSAN('d5'); 16$board->moveSAN('exd5'); 17$board->moveSAN('Qxd5'); 18$err = $board->moveSAN('P@d5'); 19$phpunit->assertErrors(array( 20 array('package' => 'PEAR_Error', 'message' => 'There is already a piece on d5, cannot place another there') 21), 'error 2'); 22$phpunit->assertEquals(GAMES_CHESS_ERROR_PIECEINTHEWAY, $err->getCode(), 'err 2'); 23echo 'tests done'; 24?> 25--EXPECT-- 26tests done