Skip to content

Commit

Permalink
refactor feature tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sagautam5 committed Feb 10, 2021
1 parent f0a3680 commit b6b4e8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
7 changes: 3 additions & 4 deletions tests/Feature/DistrictMunicipalityFeatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct()
/**
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function testGetDistrictsWithMunicipalities()
public function test_getDistrictsWithMunicipalities()
{
$districtsWithMunicipalities = $this->district->getDistrictsWithMunicipalities();

Expand All @@ -40,8 +40,7 @@ public function testGetDistrictsWithMunicipalities()
$this->fail('Failed to get associated municipalities of district');
}
}

if ($correct)
$this->assertTrue(true);

$this->assertTrue($correct);
}
}
5 changes: 2 additions & 3 deletions tests/Feature/MunicipalityCountByCategoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct()
/**
* Test Municipalities Count for Each Category
*/
public function testMunicipalityCountByCategory()
public function test_municipalityCountByCategory()
{
$categoryIdSet = range(1,4);
$categoryCountSet = [6,11,276,460];
Expand All @@ -43,7 +43,6 @@ public function testMunicipalityCountByCategory()
}
}

if($correct)
$this->assertTrue(true);
$this->assertTrue($correct);
}
}
10 changes: 4 additions & 6 deletions tests/Feature/ProvinceDistrictFeatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct()
*
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function testGetProvincesWithDistricts()
public function test_getProvincesWithDistricts()
{
$provinceWithDistricts = $this->province->getProvincesWithDistricts();

Expand All @@ -45,16 +45,15 @@ public function testGetProvincesWithDistricts()
}
}

if ($correct)
$this->assertTrue(true);
$this->assertTrue($correct);
}

/**
* Check if Districts And Their Municipalities Are Correctly Loaded With Provinces
*
* @throws \Sagautam5\LocalStateNepal\Exceptions\LoadingException
*/
public function testGetProvincesWithDistrictsWithMunicipalities()
public function test_getProvincesWithDistrictsWithMunicipalities()
{
$provinceWithDistrictWithMunicipalities = $this->province->getProvincesWithDistrictsWithMunicipalities();

Expand All @@ -73,7 +72,6 @@ public function testGetProvincesWithDistrictsWithMunicipalities()
}
}

if($correct)
$this->assertTrue(true);
$this->assertTrue($correct);
}
}

0 comments on commit b6b4e8f

Please sign in to comment.