public function testBlackFirst() { $chess = new ChessPublicator(); $chess->move('e4'); $fen = $chess->fen(); $chess->load($fen); // do setup with black first $chess->move('e5'); $chess->move('Nf3'); $chess->move('Nc6'); //~ $pgn = $chess->pgn([ 'max_width' => 40, 'new_line' => PHP_EOL ]); $pgn = $chess->pgn(); //~ echo $pgn;exit; // check setup ok $this->assertContains('[SetUp "1"]', $pgn); $this->assertContains('[FEN "' . $fen . '"]', $pgn); // check movements $this->assertContains('1. ... e5', $pgn); $this->assertContains('2. Nf3 Nc6', $pgn); }