Jarry1250 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/213791

Change subject: Add simple test for SVGFile::newFromMessageGroup()
......................................................................

Add simple test for SVGFile::newFromMessageGroup()

Change-Id: If4752d5a4ee5a7b78e77ef3e30aeefff84ea1bbc
---
M tests/phpunit/SVGFileTest.php
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TranslateSvg 
refs/changes/91/213791/1

diff --git a/tests/phpunit/SVGFileTest.php b/tests/phpunit/SVGFileTest.php
index 5843f77..eef0490 100644
--- a/tests/phpunit/SVGFileTest.php
+++ b/tests/phpunit/SVGFileTest.php
@@ -20,6 +20,11 @@
         */
        private $svg;
 
+       public static function setUpBeforeClass() {
+               parent::setUpBeforeClass();
+               self::prepareFile( __DIR__ . '/../data/Speech_bubbles.svg' );
+       }
+
        public function setUp() {
                parent::setUp();
                $this->svg = new SVGFile( __DIR__ . 
'/../data/Speech_bubbles.svg', 'en' );
@@ -435,4 +440,9 @@
                // Check that we are not actually destroying the XML file
                $this->assertGreaterThan( 1500, strlen( file_get_contents( 
$tempPath ) ) );
        }
+
+       public function testNewFromMessageGroup () {
+               $svgFromMessageGroup = SVGFile::newFromMessageGroup( 
$this->messageGroup );
+               $this->assertEquals( $this->svg->saveToString(), 
$svgFromMessageGroup->saveToString() );
+       }
 }
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/213791
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4752d5a4ee5a7b78e77ef3e30aeefff84ea1bbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TranslateSvg
Gerrit-Branch: master
Gerrit-Owner: Jarry1250 <jarry1...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to