diff options
author | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
commit | fc7369835258467bf97eb64f184b93691f9a9fd5 (patch) | |
tree | daabd60089d2dd76d9f5fb416b005fbe159c799d /bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php |
first commit
Diffstat (limited to 'bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php')
-rw-r--r-- | bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php new file mode 100644 index 00000000..e412749a --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php @@ -0,0 +1,30 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\Content; +use PHPUnit_Framework_TestCase; + +class ContentTest extends PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $data, $model ) { + $content = new Content( $data, $model ); + $this->assertEquals( $data, $content->getData() ); + $this->assertEquals( $model, $content->getModel() ); + $this->assertTrue( is_string( $content->getHash() ) ); + $this->assertFalse( $content->hasChanged() ); + } + + public function provideValidConstruction() { + return array( + array( '', null ), + array( 'foo', null ), + array( new \stdClass(), null ), + ); + } + +} +
\ No newline at end of file |