@@ -543,7 +543,7 @@ public function testWhenNoPreferredStatements_getBestStatementsReturnsOnlyNormal
543543 public function testGivenNotPresentStatement_getIndexByGuidReturnsFalse () {
544544 $ statements = new StatementList ();
545545
546- $ this ->assertFalse ( $ statements ->getIndexByGuid ( $ this -> getStatement ( 1 , 'kittens ' ) ) );
546+ $ this ->assertFalse ( $ statements ->getIndexByGuid ( 'kittens ' ) );
547547 }
548548
549549 public function testGivenPresentStatement_getIndexByGuidReturnsItsIndex () {
@@ -555,7 +555,7 @@ public function testGivenPresentStatement_getIndexByGuidReturnsItsIndex() {
555555
556556 $ this ->assertSame (
557557 1 ,
558- $ statements ->getIndexByGuid ( $ this -> getStatement ( 42 , 'kittens42 ' ) )
558+ $ statements ->getIndexByGuid ( 'kittens42 ' )
559559 );
560560 }
561561
@@ -569,7 +569,7 @@ public function testGivenDoublyPresentStatement_getIndexByGuidReturnsTheFirstInd
569569
570570 $ this ->assertSame (
571571 1 ,
572- $ statements ->getIndexByGuid ( $ this -> getStatement ( 42 , 'kittens42 ' ) )
572+ $ statements ->getIndexByGuid ( 'kittens42 ' )
573573 );
574574 }
575575
@@ -582,8 +582,15 @@ public function testGivenDifferentStatementWithSameGuid_getIndexByGuidReturnsIts
582582
583583 $ this ->assertSame (
584584 2 ,
585- $ statements ->getIndexByGuid ( $ this -> getStatement ( 42 , 'kittens41 ' ) )
585+ $ statements ->getIndexByGuid ( 'kittens41 ' )
586586 );
587587 }
588588
589+ public function testGivenInvalidGuid_getIndexByGuidThrowsException () {
590+ $ statements = new StatementList ();
591+
592+ $ this ->setExpectedException ( 'InvalidArgumentException ' );
593+ $ statements ->getIndexByGuid ( false );
594+ }
595+
589596}
0 commit comments