Skip to content

Commit

Permalink
A few missed @test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Jun 21, 2024
1 parent edc947a commit 3fb4084
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 43 deletions.
3 changes: 1 addition & 2 deletions tests/Feature/GraphQL/Fieldtypes/BardFieldtypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,8 @@ public function it_outputs_nested_bard_fields()
]]);
}

#[Test]
/**
* @test
*
* @see https://github.com/statamic/cms/issues/3200
**/
public function it_outputs_bard_fields_with_value_based_subfields()
Expand Down
8 changes: 3 additions & 5 deletions tests/Fields/FieldTransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,8 @@ public function blank_instructions_and_icon_are_removed_from_set_groups()
], $fromVue);
}

#[Test]
/**
* @test
*
* @see https://github.com/statamic/cms/issues/10056
*/
public function it_doesnt_remove_max_items_from_form_fieldtype()
Expand Down Expand Up @@ -346,9 +345,8 @@ public function it_ensures_the_asset_container_is_saved_on_the_assets_fieldtype(
], $fromVue['field']);
}

#[Test]
/**
* @test
*
* @see https://github.com/statamic/cms/issues/10040
*/
public function it_saves_a_toggle_as_false_where_the_default_is_true()
Expand All @@ -369,7 +367,7 @@ public function it_saves_a_toggle_as_false_where_the_default_is_true()
], $fromVue['field']);
}

/** @test */
#[Test]
public function it_supports_addon_linked_fields()
{
$fieldset = tap(new Fieldset)
Expand Down
4 changes: 2 additions & 2 deletions tests/Fields/FieldsetRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function it_doesnt_delete_namespaced_fieldsets()
$this->repo->delete($fieldset);
}

/** @test */
#[Test]
public function it_gets_a_namespaced_fieldset()
{
$contents = <<<'EOT'
Expand All @@ -272,7 +272,7 @@ public function it_gets_a_namespaced_fieldset()
$this->assertEquals('foo::bar.baz.test', $fieldset->handle());
}

/** @test */
#[Test]
public function it_gets_an_overridden_namespaced_fieldset()
{
$contents = <<<'EOT'
Expand Down
4 changes: 1 addition & 3 deletions tests/Http/Middleware/AddViewPathsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ public static function namespacedViewPathProvider()
];
}

/**
* @test
*/
#[Test]
public function middleware_attached_to_routes()
{
/** @var Router $router */
Expand Down
4 changes: 1 addition & 3 deletions tests/Modifiers/LowerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

class LowerTest extends TestCase
{
/**
* @test
*/
#[Test]
public function it_converts_all_chars_to_lowercase(): void
{
$modified = $this->modify('I DON\'T KNOW WHAT WE\'RE YELLING ABOUT');
Expand Down
4 changes: 1 addition & 3 deletions tests/Modifiers/ReverseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ public function it_reverses_the_items_of_a_collection(): void
$this->assertEquals($expected, $modified);
}

/**
* @test
*/
#[Test]
public function it_reverses_items_from_query_builder(): void
{
$builder = Mockery::mock(Builder::class);
Expand Down
4 changes: 1 addition & 3 deletions tests/Modifiers/ToQsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class ToQsTest extends TestCase
{
use PreventSavingStacheItemsToDisk;

/**
* @test
*/
#[Test]
public function it_converts_to_query_string(): void
{
$input = [
Expand Down
4 changes: 1 addition & 3 deletions tests/Modifiers/WidontTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

class WidontTest extends TestCase
{
/**
* @test
*/
#[Test]
public function it_adds_space_to_plain_text()
{
$value = 'Lorem ipsum dolor sit amet.';
Expand Down
16 changes: 4 additions & 12 deletions tests/Search/CombTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public function it_searches($term, $expected)
$this->assertEquals($expected, collect($results['data'] ?? [])->pluck('data.title')->all());
}

/**
* @test
**/
#[Test]
public function it_extracts_snippets()
{
$content = <<<'EOT'
Expand Down Expand Up @@ -60,9 +58,7 @@ public function it_extracts_snippets()
$this->assertEquals($expected, collect($results['data'] ?? [])->pluck('snippets.content')->all());
}

/**
* @test
**/
#[Test]
public function it_extracts_snippets_from_a_bard_field()
{
$content = [
Expand Down Expand Up @@ -206,9 +202,7 @@ public function it_extracts_snippets_from_a_bard_field()
$this->assertEquals($expected, collect($results['data'] ?? [])->pluck('snippets.content')->all());
}

/**
* @test
**/
#[Test]
public function it_can_search_for_plus_signs()
{
$comb = new Comb([
Expand All @@ -221,9 +215,7 @@ public function it_can_search_for_plus_signs()
$this->assertSame(1, $result['info']['total_results']);
}

/**
* @test
**/
#[Test]
public function it_can_search_for_slashes()
{
$comb = new Comb([
Expand Down
4 changes: 1 addition & 3 deletions tests/Support/HtmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public function nested_listing_with_unkeyed_sub_array()
$this->assertEquals('<ol><li>foo</li><li><ol><li>alfa</li><li>bravo</li></ol></li><li>bar</li></ol>', $ol);
}

/**
* @test
*/
#[Test]
public function it_returns_empty_string_when_no_list_items_given(): void
{
$list = [];
Expand Down
4 changes: 2 additions & 2 deletions tests/Tags/Collection/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ public function it_can_get_previous_and_next_entries_in_a_dated_desc_collection(
$this->assertEquals(['Grape', 'Hummus', 'Fig'], $this->runTagAndGetTitles('newer')); // Alias of prev when date:desc
}

#[Test]
/**
* @test
* https://github.com/statamic/cms/issues/1831
*/
public function it_can_get_previous_and_next_entries_in_a_dated_desc_collection_when_multiple_entries_share_the_same_date()
Expand Down Expand Up @@ -411,8 +411,8 @@ public function it_can_get_previous_and_next_entries_in_a_dated_asc_collection()
$this->assertEquals(['Carrot', 'Banana', 'Danish'], $this->runTagAndGetTitles('older')); // Alias of prev when date:desc
}

#[Test]
/**
* @test
* https://github.com/statamic/cms/issues/1831
*/
public function it_can_get_previous_and_next_entries_in_a_dated_asc_collection_when_multiple_entries_share_the_same_date()
Expand Down
3 changes: 1 addition & 2 deletions tests/Yaml/YamlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ public function it_explicitly_dumps_front_matter_without_content_when_its_null()
$this->assertStringEqualsStringIgnoringLineEndings($expected, YAML::dumpFrontMatter(['foo' => 'bar']));
}

#[Test]
/**
* @test
*
* @see https://github.com/statamic/cms/issues/3612
**/
public function it_dumps_front_matter_properly_when_symfony_yaml_dumper_doesnt_end_with_a_line_break()
Expand Down

0 comments on commit 3fb4084

Please sign in to comment.