File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1212 */
1313class ElementEmbeddedCodeTest extends SapphireTest
1414{
15+ /**
16+ * @var string
17+ */
18+ protected static $ fixture_file = '../fixtures.yml ' ;
19+
1520 /**
1621 *
1722 */
1823 public function testGetCMSFields ()
1924 {
20- $ object = Injector:: inst ()-> create (ElementEmbeddedCode::class);
25+ $ object = $ this -> objFromFixture (ElementEmbeddedCode::class, ' one ' );
2126 $ fields = $ object ->getCMSFields ();
2227 $ this ->assertInstanceOf (FieldList::class, $ fields );
2328 }
@@ -27,7 +32,7 @@ public function testGetCMSFields()
2732 */
2833 public function testGetType ()
2934 {
30- $ object = Injector:: inst ()-> create (ElementEmbeddedCode::class);
35+ $ object = $ this -> objFromFixture (ElementEmbeddedCode::class, ' one ' );
3136 $ this ->assertEquals ($ object ->getType (), 'Embedded Code ' );
3237 }
3338}
Original file line number Diff line number Diff line change 1+ Dynamic\Elements\Embedded\Elements\ElementEmbeddedCode :
2+ one :
3+ Title : " Embedded Code One"
You can’t perform that action at this time.
0 commit comments