Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Implement FeatureSet canCallMagicCall and callMagicCall methods #55

Merged

Conversation

settermjd
Copy link

Recently, I was attempting to call the lastSequenceId method of the
SequenceFeature, after adding the SequenceFeature to a TableGateway
object. However, on doing so, I discovered that both methods effectively
weren't implemented, despite what the manual alluded to. Given that I'm
adding this commit, along with the covering tests to implement the
functionality.

Recently, I was attempting to call the lastSequenceId method of the
SequenceFeature, after adding the SequenceFeature to a TableGateway
object. However, on doing so, I discovered that both methods effectively
weren't implemented, despite what the manual alluded to. Given that I'm
adding this commit, along with the covering tests to implement the
functionality.
@@ -77,4 +78,93 @@ public function testAddFeatureThatFeatureHasTableGatewayButFeatureSetDoesnotHas(
$featureSet = new FeatureSet;
$this->assertInstanceOf('Zend\Db\TableGateway\Feature\FeatureSet', $featureSet->addFeature($feature));
}

/**
* @cover FeatureSet::canCallMagicCall
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@covers instead of @cover , also, use fully namespaced class, @covers Zend\Db\TableGateway\Feature\FeatureSet::canCallMagicCall

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that. I should have picked that up sooner. Perhaps I should go to bed as it's nearly 2am.

use Zend\Db\TableGateway\Feature\MetadataFeature;
use Zend\Db\Metadata\Object\ConstraintObject;
use \ReflectionClass;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no more "", also, sort it before "Z"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@samsonasik
Copy link
Contributor

ping @ralphschindler

@mwillbanks mwillbanks added this to the 2.6.2 milestone Dec 9, 2015
@mwillbanks mwillbanks self-assigned this Dec 9, 2015
@mwillbanks mwillbanks merged commit ac8ac70 into zendframework:master Dec 9, 2015
mwillbanks added a commit that referenced this pull request Dec 9, 2015
Implement FeatureSet canCallMagicCall and callMagicCall methods
mwillbanks added a commit that referenced this pull request Dec 9, 2015
mwillbanks added a commit that referenced this pull request Dec 9, 2015
@settermjd
Copy link
Author

Thanks @mwillbanks!

@settermjd settermjd deleted the hotfix/fixCallMagicCallMethods branch December 9, 2015 15:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants