Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65702
Change subject: Simplified FQNs and imported classes ...................................................................... Simplified FQNs and imported classes Change-Id: I04e4eb99fe829e29b058d3dc9fd33d33840477c8 --- M Tests/Phpunit/Language/Description/ConjunctionTest.php M Tests/Phpunit/Language/Description/DescriptionCollectionTest.php M Tests/Phpunit/Language/Description/DisjunctionTest.php 3 files changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask refs/changes/02/65702/1 diff --git a/Tests/Phpunit/Language/Description/ConjunctionTest.php b/Tests/Phpunit/Language/Description/ConjunctionTest.php index 417923b..240a159 100644 --- a/Tests/Phpunit/Language/Description/ConjunctionTest.php +++ b/Tests/Phpunit/Language/Description/ConjunctionTest.php @@ -2,10 +2,13 @@ namespace Ask\Tests\Phpunit\Language\Description; +use Ask\Language\Description\AnyValue; use Ask\Language\Description\Conjunction; use Ask\Language\Description\Description; use Ask\Language\Description\DescriptionCollection; use Ask\Language\Description\Disjunction; +use Ask\Language\Description\ValueDescription; +use DataValues\StringValue; /** * @covers Ask\Language\Description\Conjunction @@ -48,8 +51,8 @@ $instances[] = new Conjunction( array() ); $instances[] = new Conjunction( array( new Conjunction( array() ) ) ); $instances[] = new Conjunction( array( new Disjunction( array() ), new Disjunction( array() ) ) ); - $instances[] = new Conjunction( array( new \Ask\Language\Description\AnyValue() ) ); - $instances[] = new Conjunction( array( new \Ask\Language\Description\ValueDescription( new \DataValues\StringValue( 'ohi' ) ) ) ); + $instances[] = new Conjunction( array( new AnyValue() ) ); + $instances[] = new Conjunction( array( new ValueDescription( new StringValue( 'ohi' ) ) ) ); foreach ( $this->descriptionsProvider() as $argList ) { $instances[] = new Conjunction( $argList[0] ); diff --git a/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php b/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php index e545229..3b434f1 100644 --- a/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php +++ b/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php @@ -7,6 +7,9 @@ use Ask\Language\Description\Description; use Ask\Language\Description\DescriptionCollection; use Ask\Language\Description\SomeProperty; +use Ask\Language\Description\ValueDescription; +use DataValues\NumberValue; +use DataValues\StringValue; /** * Base class for unit tests for the Ask\Language\Description\DescriptionCollection deriving classes. @@ -42,8 +45,8 @@ $descriptionLists[] = array(); $descriptionLists[] = array( - new \Ask\Language\Description\AnyValue(), - new \Ask\Language\Description\ValueDescription( new \DataValues\StringValue( 'nyan nyan' ) ) + new AnyValue(), + new ValueDescription( new StringValue( 'nyan nyan' ) ) ); $descriptionList = array(); @@ -51,7 +54,7 @@ shuffle( $numbers ); foreach ( $numbers as $number ) { - $descriptionList[] = new \Ask\Language\Description\ValueDescription( new \DataValues\NumberValue( $number ) ); + $descriptionList[] = new ValueDescription( new NumberValue( $number ) ); } $descriptionLists[] = $descriptionList; diff --git a/Tests/Phpunit/Language/Description/DisjunctionTest.php b/Tests/Phpunit/Language/Description/DisjunctionTest.php index a87e978..5a2b595 100644 --- a/Tests/Phpunit/Language/Description/DisjunctionTest.php +++ b/Tests/Phpunit/Language/Description/DisjunctionTest.php @@ -2,9 +2,13 @@ namespace Ask\Tests\Phpunit\Language\Description; +use Ask\Language\Description\AnyValue; +use Ask\Language\Description\Conjunction; use Ask\Language\Description\Description; use Ask\Language\Description\DescriptionCollection; use Ask\Language\Description\Disjunction; +use Ask\Language\Description\ValueDescription; +use DataValues\StringValue; /** * @covers Ask\Language\Description\Disjunction @@ -45,10 +49,10 @@ $instances = array(); $instances[] = new Disjunction( array() ); - $instances[] = new Disjunction( array( new \Ask\Language\Description\Conjunction( array() ) ) ); + $instances[] = new Disjunction( array( new Conjunction( array() ) ) ); $instances[] = new Disjunction( array( new Disjunction( array() ), new Disjunction( array() ) ) ); - $instances[] = new Disjunction( array( new \Ask\Language\Description\AnyValue() ) ); - $instances[] = new Disjunction( array( new \Ask\Language\Description\ValueDescription( new \DataValues\StringValue( 'ohi' ) ) ) ); + $instances[] = new Disjunction( array( new AnyValue() ) ); + $instances[] = new Disjunction( array( new ValueDescription( new StringValue( 'ohi' ) ) ) ); foreach ( $this->descriptionsProvider() as $argList ) { $instances[] = new Disjunction( $argList[0] ); -- To view, visit https://gerrit.wikimedia.org/r/65702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04e4eb99fe829e29b058d3dc9fd33d33840477c8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Ask Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits