Added base tests for components
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<logging>
|
||||
<log type="tap" target="build/report.tap"/>
|
||||
<log type="junit" target="build/report.junit.xml"/>
|
||||
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
|
||||
<log type="coverage-html" target="build/coverage"/>
|
||||
<log type="coverage-text" target="build/coverage.txt"/>
|
||||
<log type="coverage-clover" target="build/logs/clover.xml"/>
|
||||
</logging>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Asantibanez\LivewireCharts\Tests;
|
||||
|
||||
use Orchestra\Testbench\TestCase;
|
||||
use Asantibanez\LivewireCharts\LivewireChartsServiceProvider;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
||||
protected function getPackageProviders($app)
|
||||
{
|
||||
return [LivewireChartsServiceProvider::class];
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function true_is_true()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
25
tests/LivewireAreaChartTest.php
Executable file
25
tests/LivewireAreaChartTest.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Asantibanez\LivewireCharts\Tests;
|
||||
|
||||
use Asantibanez\LivewireCharts\Charts\LivewireAreaChart;
|
||||
use Livewire\Livewire;
|
||||
use Livewire\Testing\TestableLivewire;
|
||||
|
||||
class LivewireAreaChartTest extends TestCase
|
||||
{
|
||||
private function buildComponent() : TestableLivewire
|
||||
{
|
||||
return Livewire::test(LivewireAreaChart::class);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function can_build_component()
|
||||
{
|
||||
//Act
|
||||
$component = $this->buildComponent();
|
||||
|
||||
//Assert
|
||||
$this->assertNotNull($component);
|
||||
}
|
||||
}
|
||||
25
tests/LivewireColumnChartTest.php
Executable file
25
tests/LivewireColumnChartTest.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Asantibanez\LivewireCharts\Tests;
|
||||
|
||||
use Asantibanez\LivewireCharts\Charts\LivewireColumnChart;
|
||||
use Livewire\Livewire;
|
||||
use Livewire\Testing\TestableLivewire;
|
||||
|
||||
class LivewireColumnChartTest extends TestCase
|
||||
{
|
||||
private function buildComponent() : TestableLivewire
|
||||
{
|
||||
return Livewire::test(LivewireColumnChart::class);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function can_build_component()
|
||||
{
|
||||
//Act
|
||||
$component = $this->buildComponent();
|
||||
|
||||
//Assert
|
||||
$this->assertNotNull($component);
|
||||
}
|
||||
}
|
||||
25
tests/LivewireLineChartTest.php
Executable file
25
tests/LivewireLineChartTest.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Asantibanez\LivewireCharts\Tests;
|
||||
|
||||
use Asantibanez\LivewireCharts\Charts\LivewireLineChart;
|
||||
use Livewire\Livewire;
|
||||
use Livewire\Testing\TestableLivewire;
|
||||
|
||||
class LivewireLineChartTest extends TestCase
|
||||
{
|
||||
private function buildComponent() : TestableLivewire
|
||||
{
|
||||
return Livewire::test(LivewireLineChart::class);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function can_build_component()
|
||||
{
|
||||
//Act
|
||||
$component = $this->buildComponent();
|
||||
|
||||
//Assert
|
||||
$this->assertNotNull($component);
|
||||
}
|
||||
}
|
||||
25
tests/LivewirePieChartTest.php
Executable file
25
tests/LivewirePieChartTest.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Asantibanez\LivewireCharts\Tests;
|
||||
|
||||
use Asantibanez\LivewireCharts\Charts\LivewirePieChart;
|
||||
use Livewire\Livewire;
|
||||
use Livewire\Testing\TestableLivewire;
|
||||
|
||||
class LivewirePieChartTest extends TestCase
|
||||
{
|
||||
private function buildComponent() : TestableLivewire
|
||||
{
|
||||
return Livewire::test(LivewirePieChart::class);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function can_build_component()
|
||||
{
|
||||
//Act
|
||||
$component = $this->buildComponent();
|
||||
|
||||
//Assert
|
||||
$this->assertNotNull($component);
|
||||
}
|
||||
}
|
||||
25
tests/TestCase.php
Executable file
25
tests/TestCase.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Asantibanez\LivewireCharts\Tests;
|
||||
|
||||
use Asantibanez\LivewireCharts\LivewireChartsServiceProvider;
|
||||
use Livewire\LivewireServiceProvider;
|
||||
use Orchestra\Testbench\TestCase as BaseTestCase;
|
||||
|
||||
class TestCase extends BaseTestCase
|
||||
{
|
||||
|
||||
protected function getPackageProviders($app)
|
||||
{
|
||||
return [
|
||||
LivewireServiceProvider::class,
|
||||
LivewireChartsServiceProvider::class
|
||||
];
|
||||
}
|
||||
|
||||
protected function getEnvironmentSetUp($app)
|
||||
{
|
||||
$app['config']->set('app.key', 'base64:Hupx3yAySikrM2/edkZQNQHslgDWYfiBfCuSThJ5SK8=');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user