Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dmj
PicaReader
Commits
9cb1c61b
Commit
9cb1c61b
authored
Mar 05, 2012
by
David Maus
Browse files
Fix E_STRICT compliance
parent
768933a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tests/unit-tests/bootstrap.php
View file @
9cb1c61b
...
...
@@ -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
src/tests/unit-tests/php/HAB/Pica/Reader/PicaPlainReaderTest.php
View file @
9cb1c61b
...
...
@@ -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
->
getField
s
(
'002@/00'
)
)
;
$subfield
=
reset
(
$field
->
getSubfield
s
(
'a'
)
);
$field
=
$record
->
getFi
rstMatchingFi
eld
(
'002@/00'
);
$subfield
=
$field
->
get
Nth
Subfield
(
'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
->
getField
s
(
'002@/00'
)
)
;
$subfield
=
reset
(
$field
->
getSubfield
s
(
'a'
)
);
$field
=
$record
->
getFi
rstMatchingFi
eld
(
'002@/00'
);
$subfield
=
$field
->
get
Nth
Subfield
(
'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
->
getField
s
(
'002@/00'
)
)
;
$subfield
=
reset
(
$field
->
getSubfield
s
(
'a'
)
);
$field
=
$record
->
getFi
rstMatchingFi
eld
(
'002@/00'
);
$subfield
=
$field
->
get
Nth
Subfield
(
'a'
,
0
);
$this
->
assertEquals
(
'doubledollar$'
,
$subfield
->
getValue
());
}
public
function
testReadDoubleEncodedDoubleDollarSignOnly
()
{
$this
->
_reader
->
open
(
'002@/00 $0T$a$$'
);
$record
=
$this
->
_reader
->
read
();
$field
=
reset
(
$record
->
getField
s
(
'002@/00'
)
)
;
$subfield
=
reset
(
$field
->
getSubfield
s
(
'a'
)
);
$field
=
$record
->
getFi
rstMatchingFi
eld
(
'002@/00'
);
$subfield
=
$field
->
get
Nth
Subfield
(
'a'
,
0
);
$this
->
assertEquals
(
'$'
,
$subfield
->
getValue
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment