$this->assertFalse( array_key_exists( 'a_slot_data', $queryInfo['joins'] ) );
}
- public function provideGetArchiveQueryInfo() {
- yield [
- [
- 'tables' => [
- 'archive',
- ],
- 'fields' => array_merge(
- $this->getDefaultArchiveFields( false ),
- [
- 'ar_comment_text' => 'ar_comment',
- 'ar_comment_data' => 'NULL',
- 'ar_comment_cid' => 'NULL',
- 'ar_user_text' => 'ar_user_text',
- 'ar_user' => 'ar_user',
- 'ar_actor' => 'NULL',
- ]
- ),
- 'joins' => [
- ],
- ]
- ];
- }
-
- public function provideGetQueryInfo() {
- // TODO: more option variations
- yield [
- [ 'page', 'user' ],
- [
- 'tables' => [
- 'revision',
- 'page',
- 'user',
- ],
- 'fields' => array_merge(
- $this->getDefaultQueryFields( false ),
- $this->getCommentQueryFields(),
- $this->getActorQueryFields(),
- [
- 'page_namespace',
- 'page_title',
- 'page_id',
- 'page_latest',
- 'page_is_redirect',
- 'page_len',
- 'user_name',
- ]
- ),
- 'joins' => [
- 'page' => [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
- 'user' => [ 'LEFT JOIN', [ 'rev_user != 0', 'user_id = rev_user' ] ],
- ],
- ]
- ];
- }
-
- public function provideGetSlotsQueryInfo() {
- yield 'no options' => [
- [],
- [
- 'tables' => [
- 'slots'
- ],
- 'fields' => [
- 'slot_revision_id',
- 'slot_content_id',
- 'slot_origin',
- 'slot_role_id',
- ],
- 'joins' => [],
- ]
- ];
- yield 'role option' => [
- [ 'role' ],
- [
- 'tables' => [
- 'slots',
- 'slot_roles',
- ],
- 'fields' => [
- 'slot_revision_id',
- 'slot_content_id',
- 'slot_origin',
- 'slot_role_id',
- 'role_name',
- ],
- 'joins' => [
- 'slot_roles' => [ 'LEFT JOIN', [ 'slot_role_id = role_id' ] ],
- ],
- ]
- ];
- yield 'content option' => [
- [ 'content' ],
- [
- 'tables' => [
- 'slots',
- 'content',
- ],
- 'fields' => [
- 'slot_revision_id',
- 'slot_content_id',
- 'slot_origin',
- 'slot_role_id',
- 'content_size',
- 'content_sha1',
- 'content_address',
- 'content_model',
- ],
- 'joins' => [
- 'content' => [ 'INNER JOIN', [ 'slot_content_id = content_id' ] ],
- ],
- ]
- ];
- yield 'content and model options' => [
- [ 'content', 'model' ],
- [
- 'tables' => [
- 'slots',
- 'content',
- 'content_models',
- ],
- 'fields' => [
- 'slot_revision_id',
- 'slot_content_id',
- 'slot_origin',
- 'slot_role_id',
- 'content_size',
- 'content_sha1',
- 'content_address',
- 'content_model',
- 'model_name',
- ],
- 'joins' => [
- 'content' => [ 'INNER JOIN', [ 'slot_content_id = content_id' ] ],
- 'content_models' => [ 'LEFT JOIN', [ 'content_model = model_id' ] ],
- ],
- ]
- ];
- }
-
public function provideNewMutableRevisionFromArray() {
foreach ( parent::provideNewMutableRevisionFromArray() as $case ) {
yield $case;