Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sagautam5 committed Jan 21, 2024
1 parent 9a92627 commit 153129b
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 38 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"require": {
},
"require-dev": {
"phpunit/phpunit": "4.0.*"
"phpunit/phpunit": "10.0.*"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions tests/Feature/DistrictMunicipalityFeatureTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Feature;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\District;

class DistrictMunicipalityFeatureTest extends PHPUnit_Framework_TestCase
final class DistrictMunicipalityFeatureTest extends TestCase
{

/**
Expand All @@ -21,9 +21,9 @@ class DistrictMunicipalityFeatureTest extends PHPUnit_Framework_TestCase
* DistrictMunicipalityFeatureTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);

$this->language = $_ENV['APP_LANG'];
$this->district = new District($this->language);
Expand Down
8 changes: 4 additions & 4 deletions tests/Feature/MunicipalityCountByCategoryTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Feature;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\Municipality;

class MunicipalityCountByCategoryTest extends PHPUnit_Framework_TestCase
final class MunicipalityCountByCategoryTest extends TestCase
{
/**
* @var Municipality
Expand All @@ -20,9 +20,9 @@ class MunicipalityCountByCategoryTest extends PHPUnit_Framework_TestCase
* MunicipalityCountByCategoryTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);

$this->language = $_ENV['APP_LANG'];
$this->municipality = new Municipality($this->language);
Expand Down
8 changes: 4 additions & 4 deletions tests/Feature/ProvinceDistrictFeatureTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Feature;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\Province;

/**
* Class ProvinceDistrictFeatureTest
*/
class ProvinceDistrictFeatureTest extends PHPUnit_Framework_TestCase
final class ProvinceDistrictFeatureTest extends TestCase
{
/**
* @var Province
Expand All @@ -23,9 +23,9 @@ class ProvinceDistrictFeatureTest extends PHPUnit_Framework_TestCase
* ProvinceDistrictFeatureTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);

$this->language = $_ENV['APP_LANG'];
$this->province = new Province($this->language);
Expand Down
10 changes: 5 additions & 5 deletions tests/Feature/StatTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Feature;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\Municipality;

/**
* Class ProvinceDistrictFeatureTest
*/
class StatTest extends PHPUnit_Framework_TestCase
final class StatTest extends TestCase
{
/**
* @var array
Expand All @@ -20,12 +20,12 @@ class StatTest extends PHPUnit_Framework_TestCase
private $municipality;

/**
* ProvinceDistrictFeatureTest constructor.D
* ProvinceDistrictFeatureTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);
$this->language = $_ENV['APP_LANG'];
$this->municipality = new Municipality($this->language);
}
Expand Down
19 changes: 19 additions & 0 deletions tests/LocalStateTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
namespace Sagautam5\LocalStateNepal\Test;

use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\Category;

/**
* Class LocalStateTest
*/
abstract class LocalStateTest extends TestCase
{
/**
* LocalStateTest constructor.
*/
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct($name, $data, $dataName);
}
}
8 changes: 4 additions & 4 deletions tests/Unit/CategoryTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Unit;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\Category;

/**
* Class CategoryTest
*/
class CategoryTest extends PHPUnit_Framework_TestCase
final class CategoryTest extends TestCase
{
/**
* @var Category
Expand All @@ -23,9 +23,9 @@ class CategoryTest extends PHPUnit_Framework_TestCase
* CategoryTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);

$this->lang = $_ENV['APP_LANG'];
$this->category = new Category($this->lang);
Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/DistrictTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Unit;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\District;

/**
* Class DistrictTest
*/
class DistrictTest extends PHPUnit_Framework_TestCase
final class DistrictTest extends TestCase
{
/**
* @var District
Expand All @@ -23,9 +23,9 @@ class DistrictTest extends PHPUnit_Framework_TestCase
* DistrictTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);

$this->language = $_ENV['APP_LANG'];
$this->district = new District($this->language);
Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/HelperTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Unit;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Helpers\Helper;

/**
* Class HelperTest
*/
class HelperTest extends PHPUnit_Framework_TestCase
final class HelperTest extends TestCase
{
/**
* @var Helper
Expand All @@ -27,9 +27,9 @@ class HelperTest extends PHPUnit_Framework_TestCase
/**
* HelperTest constructor.
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);
$this->helper = new Helper();
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/MunicipalityTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Unit;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\Municipality;

/**
* Class MunicipalityTest
*/
class MunicipalityTest extends PHPUnit_Framework_TestCase
final class MunicipalityTest extends TestCase
{
/**
* @var Municipality
Expand All @@ -23,9 +23,9 @@ class MunicipalityTest extends PHPUnit_Framework_TestCase
* MunicipalityTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);

$this->language = $_ENV['APP_LANG'];

Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/ProvinceTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Sagautam5\LocalStateNepal\Test\Unit;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Sagautam5\LocalStateNepal\Entities\Province;

/**
* Class ProvinceTest
*/
class ProvinceTest extends PHPUnit_Framework_TestCase
final class ProvinceTest extends TestCase
{

/**
Expand All @@ -24,9 +24,9 @@ class ProvinceTest extends PHPUnit_Framework_TestCase
* ProvinceTest constructor.
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function __construct()
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct();
parent::__construct($name, $data, $dataName);

$this->language = $_ENV['APP_LANG'];

Expand Down

0 comments on commit 153129b

Please sign in to comment.