-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
@forward 'display'; | ||
@forward 'margin'; | ||
@forward 'vertical-align'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@use 'sprucecss/scss/spruce' as *; | ||
|
||
.vertical-align\:top { | ||
vertical-align: top !important; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace Cone\Root\Tests\Fields; | ||
|
||
use Cone\Root\Fields\Repeater; | ||
use Cone\Root\Fields\Text; | ||
use Cone\Root\Tests\TestCase; | ||
|
||
class RepeaterTest extends TestCase | ||
{ | ||
protected Repeater $field; | ||
|
||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->field = Repeater::make('Properties') | ||
->withFields(function () { | ||
return [ | ||
new Text('Name'), | ||
]; | ||
}); | ||
} | ||
|
||
public function test_a_repeater_field_has_repeater_template(): void | ||
{ | ||
$this->assertSame('root::fields.repeater', $this->field->getTemplate()); | ||
} | ||
|
||
public function test_a_repeater_field_register_routes(): void | ||
{ | ||
$this->app['router']->prefix('posts/fields')->group(function ($router) { | ||
$this->field->registerRoutes($this->app['request'], $router); | ||
}); | ||
|
||
$this->assertSame('/posts/fields/properties', $this->field->getUri()); | ||
|
||
$this->assertArrayHasKey( | ||
trim($this->field->getUri(), '/'), | ||
$this->app['router']->getRoutes()->get('POST') | ||
); | ||
} | ||
} |