Skip to content

Commit

Permalink
adding new version of phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
eaperezc committed Mar 16, 2018
1 parent b959a58 commit c0601f4
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 42 deletions.
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
"type": "library",
"require": {
"php": ">=5.4",
"guzzlehttp/guzzle": "^6.3"
},
"require-dev": {
"phpunit/phpunit": "5.2.*"
"guzzlehttp/guzzle": "^6.3",
"phpunit/phpunit": "^7.0"
},
"autoload": {
"psr-4": {
Expand Down
9 changes: 0 additions & 9 deletions src/Entities/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class Post extends JsonSerializableObject
protected $markdown;
protected $html;
protected $plaintext;
protected $image;
protected $featured;
protected $page;
protected $status;
Expand Down Expand Up @@ -117,14 +116,6 @@ public function getHtml()
return $this->html;
}

/**
* @return string
*/
public function getImage()
{
return $this->image;
}

/**
* @return string
*/
Expand Down
18 changes: 9 additions & 9 deletions src/Entities/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ class Tag extends JsonSerializableObject
protected $hidden;
protected $visibility;
protected $parent;
protected $image;
protected $metaTitle;
protected $metaDescription;
protected $createdAt;
protected $createdBy;
protected $updatedAt;
protected $updatedBy;
protected $featureImage;

/**
* @return integer
Expand Down Expand Up @@ -86,14 +86,6 @@ public function getParent()
return $this->parent;
}

/**
* @return string
*/
public function getImage()
{
return $this->image;
}

/**
* @return string
*/
Expand Down Expand Up @@ -141,4 +133,12 @@ public function getUpdatedBy()
{
return $this->updatedBy;
}

/**
* @return string
*/
public function getFeatureImage()
{
return $this->featureImage;
}
}
9 changes: 5 additions & 4 deletions tests/Entities/PostTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
<?php

use GhostIO\Entities\Post;
use PHPUnit\Framework\TestCase;

/**
* Corresponding Class to test Post class
* @author Enrique <[email protected]>
*/
class PostTest extends PHPUnit_Framework_TestCase
class PostTest extends TestCase
{

protected $post;
Expand All @@ -18,7 +19,7 @@ protected function setUp()
}

/**
* Just check if the Post has no syntax error
* Just check if the Post has no syntax error
*
* This is just a simple check to make sure your library has no syntax error. This helps you troubleshoot
* any typo before you even use this library in a real project.
Expand All @@ -44,4 +45,4 @@ public function testPostCanBeReturnedAsJson()
$this->assertArrayHasKey('markdown', $post);
}

}
}
9 changes: 5 additions & 4 deletions tests/Entities/TagTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
<?php

use GhostIO\Entities\Tag;
use PHPUnit\Framework\TestCase;

/**
* Corresponding Class to test Tag class
* @author Enrique <[email protected]>
*/
class TagTest extends PHPUnit_Framework_TestCase
class TagTest extends TestCase
{

protected $tag;
Expand All @@ -18,7 +19,7 @@ protected function setUp()
}

/**
* Just check if the Tag has no syntax error
* Just check if the Tag has no syntax error
*
* This is just a simple check to make sure your library has no syntax error. This helps you troubleshoot
* any typo before you even use this library in a real project.
Expand All @@ -43,4 +44,4 @@ public function testTagCanBeReturnedAsJson()
$this->assertArrayHasKey('slug', $tag);
}

}
}
9 changes: 5 additions & 4 deletions tests/Entities/UserTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
<?php

use GhostIO\Entities\User;
use PHPUnit\Framework\TestCase;

/**
* Corresponding Class to test User class
* @author Enrique <[email protected]>
*/
class UserTest extends PHPUnit_Framework_TestCase
class UserTest extends TestCase
{

protected $user;
Expand All @@ -18,7 +19,7 @@ protected function setUp()
}

/**
* Just check if the User has no syntax error
* Just check if the User has no syntax error
*
* This is just a simple check to make sure your library has no syntax error. This helps you troubleshoot
* any typo before you even use this library in a real project.
Expand All @@ -44,4 +45,4 @@ public function testUserCanBeReturnedAsJson()
$this->assertArrayHasKey('website', $user);
}

}
}
4 changes: 2 additions & 2 deletions tests/Providers/PostProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GhostIO\Tests\Providers;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use GhostIO\Providers\PostProvider;
use GhostIO\Tests\Mocks\ResponseDummy;
use GhostIO\Tests\Mocks\ResponseBodyDummy;
Expand All @@ -11,7 +11,7 @@
* Corresponding Class to test PostProvider class
* @author Enrique <[email protected]>
*/
class PostProviderTest extends PHPUnit_Framework_TestCase
class PostProviderTest extends TestCase
{

protected $provider;
Expand Down
4 changes: 2 additions & 2 deletions tests/Providers/TagProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GhostIO\Tests\Providers;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use GhostIO\Providers\TagProvider;
use GhostIO\Tests\Mocks\ResponseDummy;
use GhostIO\Tests\Mocks\ResponseBodyDummy;
Expand All @@ -11,7 +11,7 @@
* Corresponding Class to test TagProvider class
* @author Enrique <[email protected]>
*/
class TagProviderTest extends PHPUnit_Framework_TestCase
class TagProviderTest extends TestCase
{

protected $provider;
Expand Down
4 changes: 2 additions & 2 deletions tests/Providers/UserProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GhostIO\Tests\Providers;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use GhostIO\Providers\UserProvider;
use GhostIO\Tests\Mocks\ResponseDummy;
use GhostIO\Tests\Mocks\ResponseBodyDummy;
Expand All @@ -11,7 +11,7 @@
* Corresponding Class to test UserProvider class
* @author Enrique <[email protected]>
*/
class UserProviderTest extends PHPUnit_Framework_TestCase
class UserProviderTest extends TestCase
{

protected $provider;
Expand Down
4 changes: 2 additions & 2 deletions tests/Utils/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace GhostIO\Tests\Utils;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use GhostIO\Utils\Collection;

/**
* Corresponding Class to test the collections class
* @author Enrique <[email protected]>
*/
class PostProviderTest extends PHPUnit_Framework_TestCase
class PostProviderTest extends TestCase
{

protected $collection;
Expand Down

0 comments on commit c0601f4

Please sign in to comment.