@@ -42,20 +42,24 @@ public function test(): void
42
42
{
43
43
$ productTag = 'cat_p ' ;
44
44
$ categoryTag = 'cat_c ' ;
45
- $ additionalTags = ['cat_c_p ' ];
46
- $ productIds = [1 , 2 , 3 ];
45
+ $ additionalTags1 = ['cat_c_p ' ];
46
+ $ additionalTags2 = ['cms_page ' ];
47
+ $ productIds1 = [1 , 2 , 3 ];
48
+ $ productIds2 = [4 ];
47
49
$ categoryIds = [5 , 6 , 7 ];
48
50
$ this ->model ->start ();
49
- $ this ->model ->registerEntities ($ productTag , $ productIds );
51
+ $ this ->model ->registerEntities ($ productTag , $ productIds1 );
52
+ $ this ->model ->registerTags ($ additionalTags1 );
50
53
$ this ->model ->start ();
54
+ $ this ->model ->registerEntities ($ productTag , $ productIds2 );
51
55
$ this ->model ->registerEntities ($ categoryTag , $ categoryIds );
52
- $ this ->model ->registerTags ($ additionalTags );
56
+ $ this ->model ->registerTags ($ additionalTags2 );
53
57
$ this ->assertEmpty ($ this ->context ->getIdentities ());
54
58
$ this ->model ->commit ();
55
59
$ this ->assertEmpty ($ this ->context ->getIdentities ());
56
60
$ this ->model ->commit ();
57
61
$ this ->assertEquals (
58
- ['cat_p_1 ' , 'cat_p_2 ' , 'cat_p_3 ' , 'cat_c_5 ' , 'cat_c_6 ' , 'cat_c_7 ' , 'cat_c_p ' ],
62
+ ['cat_p_1 ' , 'cat_p_2 ' , 'cat_p_3 ' , 'cat_p_4 ' , ' cat_c_5 ' , 'cat_c_6 ' , 'cat_c_7 ' , 'cat_c_p ' , ' cms_page ' ],
59
63
$ this ->context ->getIdentities ()
60
64
);
61
65
}
0 commit comments