Skip to content

Commit

Permalink
Add first tests 😎
Browse files Browse the repository at this point in the history
  • Loading branch information
benholmen committed Sep 23, 2023
1 parent 9d333e9 commit db98107
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 9 deletions.
57 changes: 57 additions & 0 deletions tests/DefragTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace BenHolmen\Defrag\Tests;

use PHPUnit\Framework\TestCase;

class DefragTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();

usleep(rand(4_000, 100_000));
}

/** @test */
public function it_verifies_the_truth()
{
$this->assertTrue(true);
}

/** @test */
public function it_answers_the_question()
{
$this->assertEquals((int) 42, 'The Answer to the Ultimate Question of Life, The Universe, and Everything');
}

/** @test */
public function it_has_incomplete_tests()
{
$this->markTestIncomplete();
}

/** @test */
public function it_skips_the_test()
{
$this->markTestSkipped('This test has not been implemented yet.');
}

/**
* @test
*
* @dataProvider muchData
*/
public function it_runs_many_tests()
{
$this->assertTrue(true);
}

public static function muchData(): array
{
return array_map(
fn () => [],
range(1, 495),
);
}
}
9 changes: 0 additions & 9 deletions tests/ExampleTest.php

This file was deleted.

0 comments on commit db98107

Please sign in to comment.