]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
get rid of phpunits warnings about deprecated assertType usages
authorChristian Weiske <cweiske@cweiske.de>
Fri, 18 Feb 2011 07:01:18 +0000 (08:01 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 18 Feb 2011 07:01:18 +0000 (08:01 +0100)
tests/Bookmark2TagTest.php
tests/BookmarkTest.php
tests/UserTest.php

index e6aaf1d36107e2468ce66d3a3164db7f3a99379d..1823c603fa7f19edecb1f2331c07770ffa302315 100644 (file)
@@ -120,7 +120,7 @@ class Bookmark2TagTest extends TestBase
         $this->b2ts->attachTags($bid, array('foo', 'bar', 'fuu'));
 
         $tags = $this->b2ts->getTagsForBookmark($bid);
-        $this->assertType('array', $tags);
+        $this->assertInternalType('array', $tags);
         $this->assertContains('foo', $tags);
         $this->assertContains('bar', $tags);
         $this->assertContains('fuu', $tags);
@@ -141,10 +141,10 @@ class Bookmark2TagTest extends TestBase
         $alltags = $this->b2ts->getTagsForBookmarks(
             array($bid1, $bid2)
         );
-        $this->assertType('array', $alltags);
+        $this->assertInternalType('array', $alltags);
         $this->assertEquals(2, count($alltags));
-        $this->assertType('array', $alltags[$bid1]);
-        $this->assertType('array', $alltags[$bid2]);
+        $this->assertInternalType('array', $alltags[$bid1]);
+        $this->assertInternalType('array', $alltags[$bid2]);
         $this->assertEquals(0, count($alltags[$bid1]));
         $this->assertEquals(0, count($alltags[$bid2]));
     }
@@ -179,9 +179,9 @@ class Bookmark2TagTest extends TestBase
         $alltags = $this->b2ts->getTagsForBookmarks(
             array($bid1, $bid2, $bid3, $bid4)
         );
-        $this->assertType('array', $alltags);
+        $this->assertInternalType('array', $alltags);
         foreach ($alltags as $bid => $btags) {
-            $this->assertType('array', $btags);
+            $this->assertInternalType('array', $btags);
             if ($bid == $bid1) {
                 $this->assertEquals(3, count($btags));
                 $this->assertContains('foo', $btags);
index 2a7c31890e38b8ed876df2b498e19cac41d8f654..f54fe9af76e3ca401b55e704eb3e551606beba49 100644 (file)
@@ -263,7 +263,7 @@ class BookmarkTest extends TestBase
         $bookmark = $this->bs->getBookmark($bid);
 
         $ret = $this->bs->bookmarksExist(array($bookmark['bAddress']));
-        $this->assertType('array', $ret);
+        $this->assertInternalType('array', $ret);
         $this->assertEquals(1, count($ret));
         $this->assertTrue($ret[$bookmark['bAddress']]);
     }
@@ -291,7 +291,7 @@ class BookmarkTest extends TestBase
                 $bookmark2['bAddress']
             )
         );
-        $this->assertType('array', $ret);
+        $this->assertInternalType('array', $ret);
         $this->assertEquals(2, count($ret));
         $this->assertTrue($ret[$bookmark['bAddress']]);
         $this->assertTrue($ret[$bookmark2['bAddress']]);
@@ -308,7 +308,7 @@ class BookmarkTest extends TestBase
     public function testBookmarksExistFalseSingle()
     {
         $ret = $this->bs->bookmarksExist(array('does-not-exist'));
-        $this->assertType('array', $ret);
+        $this->assertInternalType('array', $ret);
         $this->assertEquals(1, count($ret));
         $this->assertFalse($ret['does-not-exist']);
     }
@@ -329,7 +329,7 @@ class BookmarkTest extends TestBase
             'does-not-exist-3',
         );
         $ret = $this->bs->bookmarksExist($bms);
-        $this->assertType('array', $ret);
+        $this->assertInternalType('array', $ret);
         $this->assertEquals(3, count($ret));
         $this->assertFalse($ret['does-not-exist']);
         $this->assertFalse($ret['does-not-exist-2']);
@@ -366,7 +366,7 @@ class BookmarkTest extends TestBase
                 'does-not-exist-3'
             )
         );
-        $this->assertType('array', $ret);
+        $this->assertInternalType('array', $ret);
         $this->assertEquals(5, count($ret));
         $this->assertTrue($ret[$bookmark['bAddress']]);
         $this->assertTrue($ret[$bookmark2['bAddress']]);
@@ -475,7 +475,7 @@ class BookmarkTest extends TestBase
 
         foreach ($bms['bookmarks'] as $bm) {
             $this->assertArrayHasKey('tags', $bm);
-            $this->assertType('array', $bm['tags']);
+            $this->assertInternalType('array', $bm['tags']);
             if ($bm['bId'] == $bid) {
                 $this->assertContains('foo', $bm['tags']);
                 $this->assertContains('bar', $bm['tags']);
@@ -756,7 +756,7 @@ class BookmarkTest extends TestBase
 
         $bm = $this->bs->getBookmark($bid, true);
         $this->assertArrayHasKey('tags', $bm);
-        $this->assertType('array', $bm['tags']);
+        $this->assertInternalType('array', $bm['tags']);
         $this->assertContains('foo', $bm['tags']);
         $this->assertContains('bar', $bm['tags']);
     }
@@ -874,7 +874,7 @@ class BookmarkTest extends TestBase
         $bid = $this->addBookmark($uid, $url);
 
         $bm = $this->bs->getBookmarkByAddress($url);
-        $this->assertType('array', $bm);
+        $this->assertInternalType('array', $bm);
         $this->assertEquals($url, $bm['bAddress']);
     }
 
@@ -900,7 +900,7 @@ class BookmarkTest extends TestBase
         $bid = $this->addBookmark($uid, $url);
 
         $bm = $this->bs->getBookmarkByAddress($incomplete);
-        $this->assertType('array', $bm);
+        $this->assertInternalType('array', $bm);
         $this->assertEquals($url, $bm['bAddress']);
     }
 
@@ -951,7 +951,7 @@ class BookmarkTest extends TestBase
         $this->assertEquals('new description', $bm['bDescription']);
         $this->assertEquals('new private note', $bm['bPrivateNote']);
         $this->assertEquals(1, $bm['bStatus']);
-        $this->assertType('array', $bm['tags']);
+        $this->assertInternalType('array', $bm['tags']);
         $this->assertEquals(1, count($bm['tags']));
         $this->assertContains('new', $bm['tags']);
     }
index 6da777687eb2d4b00b5e71ea09543d926aa4c308..49f373016e7ed6b3962408f3ac3583a83326bc58 100644 (file)
@@ -143,7 +143,7 @@ class UserTest extends TestBase
         $uid = $this->addUser();
         $users = $this->us->getObjectUsers();
         $this->assertEquals(1, count($users));
-        $this->assertType('SemanticScuttle_Model_User', reset($users));
+        $this->assertInstanceOf('SemanticScuttle_Model_User', reset($users));
     }
 
 
@@ -160,7 +160,7 @@ class UserTest extends TestBase
         $uid3 = $this->addUser();
         $users = $this->us->getObjectUsers();
         $this->assertEquals(3, count($users));
-        $this->assertType('SemanticScuttle_Model_User', reset($users));
+        $this->assertInstanceOf('SemanticScuttle_Model_User', reset($users));
     }