Commit 9cb1c61b authored by David Maus's avatar David Maus
Browse files

Fix E_STRICT compliance

parent 768933a9
......@@ -34,3 +34,6 @@ if (class_exists('Phix_Project\ContractLib\Contract'))
// step 5: define a constant with the fixture directory
define('APP_FIXTUREDIR', realpath(__DIR__ . '/../fixtures'));
// step 6: Set error level to include E_STRICT
\error_reporting(\E_ALL | \E_STRICT);
\ No newline at end of file
......@@ -48,32 +48,32 @@ class PicaPlainReaderTest extends \PHPUnit_FrameWork_TestCase {
public function testReadDoubleEncodedDollarSign () {
$this->_reader->open('002@/00 $0T$adouble$$dollar');
$record = $this->_reader->read();
$field = reset($record->getFields('002@/00'));
$subfield = reset($field->getSubfields('a'));
$field = $record->getFirstMatchingField('002@/00');
$subfield = $field->getNthSubfield('a', 0);
$this->assertEquals('double$dollar', $subfield->getValue());
}
public function testReadDoubleEncodedDoubleDollarSign2x () {
$this->_reader->open('002@/00 $0T$adouble$$$$dollar');
$record = $this->_reader->read();
$field = reset($record->getFields('002@/00'));
$subfield = reset($field->getSubfields('a'));
$field = $record->getFirstMatchingField('002@/00');
$subfield = $field->getNthSubfield('a', 0);
$this->assertEquals('double$$dollar', $subfield->getValue());
}
public function testReadDoubleEncodedDoubleDollarSignAtEnd () {
$this->_reader->open('002@/00 $0T$adoubledollar$$');
$record = $this->_reader->read();
$field = reset($record->getFields('002@/00'));
$subfield = reset($field->getSubfields('a'));
$field = $record->getFirstMatchingField('002@/00');
$subfield = $field->getNthSubfield('a', 0);
$this->assertEquals('doubledollar$', $subfield->getValue());
}
public function testReadDoubleEncodedDoubleDollarSignOnly () {
$this->_reader->open('002@/00 $0T$a$$');
$record = $this->_reader->read();
$field = reset($record->getFields('002@/00'));
$subfield = reset($field->getSubfields('a'));
$field = $record->getFirstMatchingField('002@/00');
$subfield = $field->getNthSubfield('a', 0);
$this->assertEquals('$', $subfield->getValue());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment