markTestSkipped( "Comparision file '$to' not yet defined." ); } $tokenizer = new ezcDocumentBBCodeTokenizer(); $tokens = $tokenizer->tokenizeFile( $from ); $expected = include $to; // Store test file, to have something to compare on failure $tempDir = $this->createTempDir( 'bbcode_tokenizer_' ) . '/'; file_put_contents( $tempDir . basename( $to ), "assertEquals( $expected, $tokens, 'Extracted tokens do not match expected tokens.' ); // Remove tempdir, when nothing failed. $this->removeTempDir(); } public function testNotExistantFile() { try { $tokenizer = new ezcDocumentBBCodeTokenizer(); $tokens = $tokenizer->tokenizeFile( dirname( __FILE__ ) . '/files/bbcode/tokenizer/not_existant_file.txt' ); $this->fail( 'Expected ezcBaseFileNotFoundException.' ); } catch ( ezcBaseFileNotFoundException $e ) { /* Expected */ } } } ?>