From cd13ed1daa28938076c37fb8709b46baaeee8de6 Mon Sep 17 00:00:00 2001 From: Bilge Date: Fri, 17 Jun 2016 23:07:09 +0100 Subject: [PATCH] Added NoDataType test. Fixed some unit tests to use mocks instead of foreign classes. --- .../Collection/CountableProviderRecordsTest.php | 2 +- test/Unit/Porter/Collection/ProviderRecordsTest.php | 5 ++++- .../Unit/Porter/Collection/RecordCollectionTest.php | 2 +- test/Unit/Porter/Provider/NoDataTypeTest.php | 13 +++++++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) rename test/{Unit => Integration}/Porter/Collection/CountableProviderRecordsTest.php (90%) create mode 100644 test/Unit/Porter/Provider/NoDataTypeTest.php diff --git a/test/Unit/Porter/Collection/CountableProviderRecordsTest.php b/test/Integration/Porter/Collection/CountableProviderRecordsTest.php similarity index 90% rename from test/Unit/Porter/Collection/CountableProviderRecordsTest.php rename to test/Integration/Porter/Collection/CountableProviderRecordsTest.php index 30d6caa..62c51a3 100644 --- a/test/Unit/Porter/Collection/CountableProviderRecordsTest.php +++ b/test/Integration/Porter/Collection/CountableProviderRecordsTest.php @@ -1,5 +1,5 @@ getProviderData()); } diff --git a/test/Unit/Porter/Collection/RecordCollectionTest.php b/test/Unit/Porter/Collection/RecordCollectionTest.php index 40875c4..d9038c4 100644 --- a/test/Unit/Porter/Collection/RecordCollectionTest.php +++ b/test/Unit/Porter/Collection/RecordCollectionTest.php @@ -15,7 +15,7 @@ public function testFindParent() $collection3 = \Mockery::mock( RecordCollection::class, [ - $it = new \EmptyIterator, + $it = \Mockery::mock(\Iterator::class), $collection2 = \Mockery::mock( RecordCollection::class, [ diff --git a/test/Unit/Porter/Provider/NoDataTypeTest.php b/test/Unit/Porter/Provider/NoDataTypeTest.php new file mode 100644 index 0000000..e941665 --- /dev/null +++ b/test/Unit/Porter/Provider/NoDataTypeTest.php @@ -0,0 +1,13 @@ +fetch(\Mockery::mock(Connector::class))->valid()); + } +}