|
@@ -1,6 +1,6 @@
|
|
|
<?php
|
|
|
/**
|
|
|
- * Generated by PHPUnit_SkeletonGenerator on 2012-10-01 at 14:44:08.
|
|
|
+ * Generated by PHPUnit_SkeletonGenerator on 2013-02-17 at 00:37:09.
|
|
|
*/
|
|
|
class AccessTokenTest extends PHPUnit_Framework_TestCase
|
|
|
{
|
|
@@ -27,110 +27,145 @@ class AccessTokenTest extends PHPUnit_Framework_TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert () !== null.
|
|
|
+ *
|
|
|
* @covers AccessToken::empty_token
|
|
|
- * @todo Implement testEmpty_token().
|
|
|
*/
|
|
|
public function testEmpty_token()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertNotSame(
|
|
|
+ null,
|
|
|
+ AccessToken::empty_token()
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert ('') !== null.
|
|
|
+ *
|
|
|
* @covers AccessToken::parse
|
|
|
- * @todo Implement testParse().
|
|
|
*/
|
|
|
public function testParse()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertNotSame(
|
|
|
+ null,
|
|
|
+ AccessToken::parse('')
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert (base64_encode('a/b')) !== null.
|
|
|
+ *
|
|
|
+ * @covers AccessToken::parse
|
|
|
+ */
|
|
|
+ public function testParse2()
|
|
|
+ {
|
|
|
+ $this->assertNotSame(
|
|
|
+ null,
|
|
|
+ AccessToken::parse(base64_encode('a/b'))
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Generated from @assert (base64_encode('a/b/c')) !== null.
|
|
|
+ *
|
|
|
+ * @covers AccessToken::parse
|
|
|
+ */
|
|
|
+ public function testParse3()
|
|
|
+ {
|
|
|
+ $this->assertNotSame(
|
|
|
+ null,
|
|
|
+ AccessToken::parse(base64_encode('a/b/c'))
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Generated from @assert (0, 0, 'a') !== null.
|
|
|
+ *
|
|
|
* @covers AccessToken::create
|
|
|
- * @todo Implement testCreate().
|
|
|
*/
|
|
|
public function testCreate()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertNotSame(
|
|
|
+ null,
|
|
|
+ AccessToken::create(0, 0, 'a')
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert () > 0.
|
|
|
+ *
|
|
|
* @covers AccessToken::get_id
|
|
|
- * @todo Implement testGet_id().
|
|
|
*/
|
|
|
public function testGet_id()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertGreaterThan(
|
|
|
+ 0,
|
|
|
+ $this->object->get_id()
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert () > 0.
|
|
|
+ *
|
|
|
* @covers AccessToken::get_user_id
|
|
|
- * @todo Implement testGet_user_id().
|
|
|
*/
|
|
|
public function testGet_user_id()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertGreaterThan(
|
|
|
+ 0,
|
|
|
+ $this->object->get_user_id()
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert () !== null.
|
|
|
+ *
|
|
|
* @covers AccessToken::get_key
|
|
|
- * @todo Implement testGet_key().
|
|
|
*/
|
|
|
public function testGet_key()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertNotSame(
|
|
|
+ null,
|
|
|
+ $this->object->get_key()
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert () === true.
|
|
|
+ *
|
|
|
* @covers AccessToken::is_empty
|
|
|
- * @todo Implement testIs_empty().
|
|
|
*/
|
|
|
public function testIs_empty()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertSame(
|
|
|
+ true,
|
|
|
+ $this->object->is_empty()
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert () === false.
|
|
|
+ *
|
|
|
* @covers AccessToken::is_valid
|
|
|
- * @todo Implement testIs_valid().
|
|
|
*/
|
|
|
public function testIs_valid()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertSame(
|
|
|
+ false,
|
|
|
+ $this->object->is_valid()
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Generated from @assert () !== null.
|
|
|
+ *
|
|
|
* @covers AccessToken::__toString
|
|
|
- * @todo Implement test__toString().
|
|
|
*/
|
|
|
public function test__toString()
|
|
|
{
|
|
|
- // Remove the following lines when you implement this test.
|
|
|
- $this->markTestIncomplete(
|
|
|
- 'This test has not been implemented yet.'
|
|
|
+ $this->assertNotSame(
|
|
|
+ null,
|
|
|
+ $this->object->__toString()
|
|
|
);
|
|
|
}
|
|
|
}
|