Created
March 8, 2018 00:59
-
-
Save jsdecena/e854d9206ac352d02a2a2c5ee996aa78 to your computer and use it in GitHub Desktop.
Carousel Unit Test File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Unit\Carousels; | |
use Tests\TestCase; | |
class CarouselUnitTest extends TestCase | |
{ | |
/** @test */ | |
public function it_should_throw_not_found_error_exception_when_the_carousel_is_not_found() | |
{ | |
$this->expectException(CarouselNotFoundException::class); | |
$carouselRepo = new CarouselRepository(new Carousel); | |
$carouselRepo->findCarousel(999); | |
} | |
/** @test */ | |
public function it_should_throw_an_error_when_the_required_columns_are_not_filled() | |
{ | |
$this->expectException(CreateCarouselErrorException::class); | |
$carouselRepo = new CarouselRepository(new Carousel); | |
$carouselRepo->createCarousel([]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment