Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 26... Línea 26...
26
 * @covers \core\attribute_helper
26
 * @covers \core\attribute_helper
27
 */
27
 */
28
final class attribute_helper_test extends \advanced_testcase {
28
final class attribute_helper_test extends \advanced_testcase {
29
    public static function setUpBeforeClass(): void {
29
    public static function setUpBeforeClass(): void {
30
        require_once(__DIR__ . '/fixtures/attribute_helper_example.php');
30
        require_once(__DIR__ . '/fixtures/attribute_helper_example.php');
-
 
31
        parent::setUpBeforeClass();
31
    }
32
    }
Línea 32... Línea 33...
32
 
33
 
33
    /**
34
    /**
34
     * @dataProvider get_attributes_provider
35
     * @dataProvider get_attributes_provider
Línea 133... Línea 134...
133
            attribute_helper_attribute_b::class,
134
            attribute_helper_attribute_b::class,
134
        );
135
        );
135
        $this->assertInstanceOf(attribute_helper_attribute_b::class, $instance);
136
        $this->assertInstanceOf(attribute_helper_attribute_b::class, $instance);
136
    }
137
    }
Línea 137... Línea 138...
137
 
138
 
138
    public function test_get_attributes_invalid(): void {
139
    public function test_get_attributes_not_valid(): void {
139
        $this->assertNull(attribute_helper::from(non_existent_class::class));
140
        $this->assertNull(attribute_helper::from(non_existent_class::class));
140
        $this->assertNull(attribute_helper::from([non_existent_class::class]));
141
        $this->assertNull(attribute_helper::from([non_existent_class::class]));
141
        $this->assertNull(attribute_helper::from([attribute_helper_example::class, 'non_existent']));
142
        $this->assertNull(attribute_helper::from([attribute_helper_example::class, 'non_existent']));
142
        $this->assertNull(attribute_helper::from([non_existent_class::class, 'non_existent']));
143
        $this->assertNull(attribute_helper::from([non_existent_class::class, 'non_existent']));