diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/Collections/TPagedListTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Collections/TQueueTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Collections/TStackTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Security/TUserManagerTest.php | 4 | ||||
-rw-r--r-- | tests/unit/Testing/Data/Analysis/TDbStatementAnalysisParameterTest.php | 10 | ||||
-rw-r--r-- | tests/unit/Web/THttpCookieCollectionTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Web/THttpRequestTest.php | 14 | ||||
-rw-r--r-- | tests/unit/Web/THttpResponseTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Xml/TRssFeedDocumentTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Xml/TXmlElementTest.php | 2 |
10 files changed, 21 insertions, 21 deletions
diff --git a/tests/unit/Collections/TPagedListTest.php b/tests/unit/Collections/TPagedListTest.php index 2f1b40cc..72eabc31 100644 --- a/tests/unit/Collections/TPagedListTest.php +++ b/tests/unit/Collections/TPagedListTest.php @@ -172,7 +172,7 @@ class TPagedListTest extends PHPUnit_Framework_TestCase { public function testGetIterator() { $list = new TPagedList(array(1, 2)); $list->CustomPaging = true; - self::assertType('ArrayIterator', $list->getIterator()); + self::assertInstanceOf('ArrayIterator', $list->getIterator()); $n = 0; $found = 0; foreach($list as $index => $item) { diff --git a/tests/unit/Collections/TQueueTest.php b/tests/unit/Collections/TQueueTest.php index c5ec2b6b..167be249 100644 --- a/tests/unit/Collections/TQueueTest.php +++ b/tests/unit/Collections/TQueueTest.php @@ -96,7 +96,7 @@ class TQueueTest extends PHPUnit_Framework_TestCase { public function testGetIterator() { $queue = new TQueue(array(1, 2)); - self::assertType('ArrayIterator', $queue->getIterator()); + self::assertInstanceOf('ArrayIterator', $queue->getIterator()); $n = 0; $found = 0; foreach($queue as $index => $item) { diff --git a/tests/unit/Collections/TStackTest.php b/tests/unit/Collections/TStackTest.php index 77fb1c97..26406f36 100644 --- a/tests/unit/Collections/TStackTest.php +++ b/tests/unit/Collections/TStackTest.php @@ -96,7 +96,7 @@ class TStackTest extends PHPUnit_Framework_TestCase { public function testGetIterator() { $stack = new TStack(array(1, 2)); - self::assertType('ArrayIterator', $stack->getIterator()); + self::assertInstanceOf('ArrayIterator', $stack->getIterator()); $n = 0; $found = 0; foreach($stack as $index => $item) { diff --git a/tests/unit/Security/TUserManagerTest.php b/tests/unit/Security/TUserManagerTest.php index 68f2b32b..2952927b 100644 --- a/tests/unit/Security/TUserManagerTest.php +++ b/tests/unit/Security/TUserManagerTest.php @@ -115,10 +115,10 @@ class TUserManagerTest extends PHPUnit_Framework_TestCase { $userManager=new TUserManager (); $userManager->init (self::$config); $guest=$userManager->getUser(null); - self::assertType('TUser', $guest); + self::assertInstanceOf('TUser', $guest); self::assertTrue($guest->getIsGuest()); $user=$userManager->getUser('joe'); - self::assertType('TUser', $user); + self::assertInstanceOf('TUser', $user); self::assertEquals('joe', $user->getName()); self::assertEquals(array ('Writer'), $user->getRoles()); self::assertFalse($user->getIsGuest()); diff --git a/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisParameterTest.php b/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisParameterTest.php index 8e070096..d75d5bb5 100644 --- a/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisParameterTest.php +++ b/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisParameterTest.php @@ -22,28 +22,28 @@ class TDbStatementAnalysisParameterTest extends PHPUnit_Framework_TestCase public function testConstruct() { $this->analyserParameter = new TDbStatementAnalysisParameter(); - self::assertType('string', $this->analyserParameter->getStatement()); + self::assertInternalType('string', $this->analyserParameter->getStatement()); self::assertEquals('', $this->analyserParameter->getStatement()); self::assertEquals(TDbStatementClassification::UNKNOWN, $this->analyserParameter->getDefaultClassification()); self::assertNull($this->analyserParameter->getDriverName()); $this->analyserParameter = new TDbStatementAnalysisParameter('SELECT 1', TDbStatementClassification::SQL, 'mysql'); - self::assertType('string', $this->analyserParameter->getStatement()); + self::assertInternalType('string', $this->analyserParameter->getStatement()); self::assertEquals('SELECT 1', $this->analyserParameter->getStatement()); self::assertEquals(TDbStatementClassification::SQL, $this->analyserParameter->getDefaultClassification()); self::assertEquals('mysql', $this->analyserParameter->getDriverName()); } public function testStatement() { - self::assertType('string', $this->analyserParameter->getStatement()); + self::assertInternalType('string', $this->analyserParameter->getStatement()); self::assertEquals('', $this->analyserParameter->getStatement()); $this->analyserParameter->setStatement('SELECT 1'); - self::assertType('string', $this->analyserParameter->getStatement()); + self::assertInternalType('string', $this->analyserParameter->getStatement()); self::assertEquals('SELECT 1', $this->analyserParameter->getStatement()); $this->analyserParameter->setStatement(null); - self::assertType('string', $this->analyserParameter->getStatement()); + self::assertInternalType('string', $this->analyserParameter->getStatement()); self::assertEquals('', $this->analyserParameter->getStatement()); } diff --git a/tests/unit/Web/THttpCookieCollectionTest.php b/tests/unit/Web/THttpCookieCollectionTest.php index ece8f275..5af12736 100644 --- a/tests/unit/Web/THttpCookieCollectionTest.php +++ b/tests/unit/Web/THttpCookieCollectionTest.php @@ -10,7 +10,7 @@ class THttpCookieCollectionTest extends PHPUnit_Framework_TestCase { public function testConstruct() { $coll=new THttpCookieCollection(); - self::assertType('THttpCookieCollection', $coll); + self::assertInstanceOf('THttpCookieCollection', $coll); } public function testInsertAt() { diff --git a/tests/unit/Web/THttpRequestTest.php b/tests/unit/Web/THttpRequestTest.php index a5f8b226..f33bac60 100644 --- a/tests/unit/Web/THttpRequestTest.php +++ b/tests/unit/Web/THttpRequestTest.php @@ -63,13 +63,13 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { public function testGetUrl() { $request = new THttpRequest(); $request->init(null); - self::assertType('TUri', $request->getUrl()); + self::assertInstanceOf('TUri', $request->getUrl()); // Try with $_SERVER['HTTP_HOST'] empty $request=null; $request = new THttpRequest(); $request->init(null); $_SERVER['HTTP_HOST']=''; - self::assertType('TUri', $request->getUrl()); + self::assertInstanceOf('TUri', $request->getUrl()); } public function testGetUrlManager() { @@ -111,7 +111,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { $request->setUrlManager('goodmanager'); $request->init(null); self::assertEquals ('goodmanager', $request->getUrlManager()); - self::assertType ('TUrlManager',$request->getUrlManagerModule()); + self::assertInstanceOf ('TUrlManager',$request->getUrlManagerModule()); } @@ -203,7 +203,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3'; try { $browser=$request->getBrowser(); - self::assertType ('array', $browser); + self::assertInstanceOf ('array', $browser); self::assertEquals('Firefox', $browser['browser']); self::assertEquals('2.0.0.3', $browser['version']); } catch (TPhpErrorException $e) { @@ -261,7 +261,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { $request->init (null); $request->setEnableCookieValidation (false); $cookies=$request->getCookies(); - self::assertType('THttpCookieCollection', $cookies); + self::assertInstanceOf('THttpCookieCollection', $cookies); self::assertEquals('0123456789abcdef', $cookies->itemAt('phpsessid')->getValue()); $request = null; @@ -273,7 +273,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { $request->init (null); $request->setEnableCookieValidation (true); $cookies=$request->getCookies(); - self::assertType('THttpCookieCollection', $cookies); + self::assertInstanceOf('THttpCookieCollection', $cookies); self::assertEquals('0123456789abcdef', $cookies->itemAt('phpsessid')->getValue()); } @@ -318,7 +318,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { public function testGetIterator() { $request = new THttpRequest (); $request->init(null); - self::assertType ('TMapIterator', $request->getIterator()); + self::assertInstanceOf ('TMapIterator', $request->getIterator()); } public function testGetCount() { diff --git a/tests/unit/Web/THttpResponseTest.php b/tests/unit/Web/THttpResponseTest.php index 6cc453e4..8e40a2a0 100644 --- a/tests/unit/Web/THttpResponseTest.php +++ b/tests/unit/Web/THttpResponseTest.php @@ -90,7 +90,7 @@ class THttpResponseTest extends PHPUnit_Framework_TestCase { public function testGetCookies() { $response=new THttpResponse (); $response->init (null); - self::assertType('THttpCookieCollection', $response->getCookies()); + self::assertInstanceOf('THttpCookieCollection', $response->getCookies()); self::assertEquals(0, $response->getCookies()->getCount()); } diff --git a/tests/unit/Xml/TRssFeedDocumentTest.php b/tests/unit/Xml/TRssFeedDocumentTest.php index e49b5eca..6d96444a 100644 --- a/tests/unit/Xml/TRssFeedDocumentTest.php +++ b/tests/unit/Xml/TRssFeedDocumentTest.php @@ -120,7 +120,7 @@ class TRssFeedDocumentTest extends PHPUnit_Framework_TestCase { $feed->addItem($item); $items = $feed->getItems(); /* var_dump($items); - self::assertType($items[0], 'TRssItem');*/ + self::assertInstanceOf($items[0], 'TRssItem');*/ } public function testSetImage() { diff --git a/tests/unit/Xml/TXmlElementTest.php b/tests/unit/Xml/TXmlElementTest.php index 89baed03..ec560a1c 100644 --- a/tests/unit/Xml/TXmlElementTest.php +++ b/tests/unit/Xml/TXmlElementTest.php @@ -61,7 +61,7 @@ class TXmlElementTest extends PHPUnit_Framework_TestCase { self::assertEquals(null, $element->getElementByTagName('first')); $element->Elements[] = new TXmlElement('first'); $first = $element->getElementByTagName('first'); - self::assertType('TXmlElement', $first); + self::assertInstanceOf('TXmlElement', $first); self::assertEquals('first', $first->getTagName()); } |