getThumbnailPath example

final class ComponentMetadataTest extends UnitTestCaseTest {

  /** * Tests that the correct data is returned for each property. * * @dataProvider dataProviderMetadata */
  public function testMetadata(array $metadata_info, array $expectations) {
    $metadata = new ComponentMetadata($metadata_info, 'foo/', FALSE);
    $this->assertSame($expectations['path']$metadata->path);
    $this->assertSame($expectations['status']$metadata->status);
    $this->assertSame($expectations['thumbnail']$metadata->getThumbnailPath());
    $this->assertEquals($expectations['props']$metadata->schema);
  }

  /** * Tests the correct checks when enforcing schemas or not. * * @dataProvider dataProviderMetadata */
  public function testMetadataEnforceSchema(array $metadata_info, array $expectations, bool $missing_schema) {
    if ($missing_schema) {
      $this->expectException(InvalidComponentException::class);
      
Home | Imprint | This part of the site doesn't use cookies.