File tree Expand file tree Collapse file tree 12 files changed +142
-198
lines changed Expand file tree Collapse file tree 12 files changed +142
-198
lines changed Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractCacheManagement ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for cache invalidation in nested sets tree behaviors using SQL Server.
3132#[Group('mssql ' )]
3233final class CacheManagementTest extends AbstractCacheManagement
3334{
34- /**
35- * Database driver name for SQL Server.
36- */
37- protected string $ driverName = 'sqlsrv ' ;
35+ protected function setUp (): void
36+ {
37+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
38+ $ this ->dsn = MSSQLConnection::DSN ->value ;
39+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
40+ $ this ->username = MSSQLConnection::USERNAME ->value ;
3841
39- /**
40- * Data Source Name (DSN) for SQL Server connection.
41- */
42- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
43-
44- /**
45- * Password for SQL Server connection.
46- */
47- protected string $ password = 'YourStrong!Passw0rd ' ;
48-
49- /**
50- * Username for SQL Server connection.
51- */
52- protected string $ username = 'SA ' ;
42+ parent ::setUp ();
43+ }
5344}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractExceptionHandling ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for exception handling in nested sets tree behaviors using SQL Server.
3132#[Group('mssql ' )]
3233final class ExceptionHandlingTest extends AbstractExceptionHandling
3334{
34- /**
35- * Database driver name for SQL Server.
36- */
37- protected string $ driverName = 'sqlsrv ' ;
35+ protected function setUp (): void
36+ {
37+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
38+ $ this ->dsn = MSSQLConnection::DSN ->value ;
39+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
40+ $ this ->username = MSSQLConnection::USERNAME ->value ;
3841
39- /**
40- * Data Source Name (DSN) for SQL Server connection.
41- */
42- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
43-
44- /**
45- * Password for SQL Server connection.
46- */
47- protected string $ password = 'YourStrong!Passw0rd ' ;
48-
49- /**
50- * Username for SQL Server connection.
51- */
52- protected string $ username = 'SA ' ;
42+ parent ::setUp ();
43+ }
5344}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractExtensibility ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for extensibility in nested sets tree behaviors using SQL Server.
3132#[Group('mssql ' )]
3233final class ExtensibilityTest extends AbstractExtensibility
3334{
34- /**
35- * Database driver name for SQL Server.
36- */
37- protected string $ driverName = 'sqlsrv ' ;
35+ protected function setUp (): void
36+ {
37+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
38+ $ this ->dsn = MSSQLConnection::DSN ->value ;
39+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
40+ $ this ->username = MSSQLConnection::USERNAME ->value ;
3841
39- /**
40- * Data Source Name (DSN) for SQL Server connection.
41- */
42- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
43-
44- /**
45- * Password for SQL Server connection.
46- */
47- protected string $ password = 'YourStrong!Passw0rd ' ;
48-
49- /**
50- * Username for SQL Server connection.
51- */
52- protected string $ username = 'SA ' ;
42+ parent ::setUp ();
43+ }
5344}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractNodeAppend ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for node append and root promotion in nested sets tree behaviors using SQL Server.
3435#[Group('mssql ' )]
3536final class NodeAppendTest extends AbstractNodeAppend
3637{
37- /**
38- * Database driver name for SQL Server.
39- */
40- protected string $ driverName = 'sqlsrv ' ;
38+ protected function setUp (): void
39+ {
40+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
41+ $ this ->dsn = MSSQLConnection::DSN ->value ;
42+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
43+ $ this ->username = MSSQLConnection::USERNAME ->value ;
4144
42- /**
43- * Data Source Name (DSN) for SQL Server connection.
44- */
45- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
46-
47- /**
48- * Password for SQL Server connection.
49- */
50- protected string $ password = 'YourStrong!Passw0rd ' ;
51-
52- /**
53- * Username for SQL Server connection.
54- */
55- protected string $ username = 'SA ' ;
45+ parent ::setUp ();
46+ }
5647}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractNodeDelete ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for node deletion in nested sets tree behaviors using SQL Server.
3536#[Group('mssql ' )]
3637final class NodeDeleteTest extends AbstractNodeDelete
3738{
38- /**
39- * Database driver name for SQL Server.
40- */
41- protected string $ driverName = 'sqlsrv ' ;
39+ protected function setUp (): void
40+ {
41+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
42+ $ this ->dsn = MSSQLConnection::DSN ->value ;
43+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
44+ $ this ->username = MSSQLConnection::USERNAME ->value ;
4245
43- /**
44- * Data Source Name (DSN) for SQL Server connection.
45- */
46- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
47-
48- /**
49- * Password for SQL Server connection.
50- */
51- protected string $ password = 'YourStrong!Passw0rd ' ;
52-
53- /**
54- * Username for SQL Server connection.
55- */
56- protected string $ username = 'SA ' ;
46+ parent ::setUp ();
47+ }
5748}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractNodeInsert ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for node insertion in nested sets tree behaviors using SQL Server.
3334#[Group('mssql ' )]
3435final class NodeInsertTest extends AbstractNodeInsert
3536{
36- /**
37- * Database driver name for SQL Server.
38- */
39- protected string $ driverName = 'sqlsrv ' ;
37+ protected function setUp (): void
38+ {
39+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
40+ $ this ->dsn = MSSQLConnection::DSN ->value ;
41+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
42+ $ this ->username = MSSQLConnection::USERNAME ->value ;
4043
41- /**
42- * Data Source Name (DSN) for SQL Server connection.
43- */
44- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
45-
46- /**
47- * Password for SQL Server connection.
48- */
49- protected string $ password = 'YourStrong!Passw0rd ' ;
50-
51- /**
52- * Username for SQL Server connection.
53- */
54- protected string $ username = 'SA ' ;
44+ parent ::setUp ();
45+ }
5546}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractNodePrepend ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for node prepend operations in nested sets tree behaviors using SQL Server.
3233#[Group('mssql ' )]
3334final class NodePrependTest extends AbstractNodePrepend
3435{
35- /**
36- * Database driver name for SQL Server.
37- */
38- protected string $ driverName = 'sqlsrv ' ;
36+ protected function setUp (): void
37+ {
38+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
39+ $ this ->dsn = MSSQLConnection::DSN ->value ;
40+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
41+ $ this ->username = MSSQLConnection::USERNAME ->value ;
3942
40- /**
41- * Data Source Name (DSN) for SQL Server connection.
42- */
43- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
44-
45- /**
46- * Password for SQL Server connection.
47- */
48- protected string $ password = 'YourStrong!Passw0rd ' ;
49-
50- /**
51- * Username for SQL Server connection.
52- */
53- protected string $ username = 'SA ' ;
43+ parent ::setUp ();
44+ }
5445}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractNodeState ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for node state and relationship in nested sets tree behaviors using SQL Server.
3132#[Group('mssql ' )]
3233final class NodeStateTest extends AbstractNodeState
3334{
34- /**
35- * Database driver name for SQL Server.
36- */
37- protected string $ driverName = 'sqlsrv ' ;
35+ protected function setUp (): void
36+ {
37+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
38+ $ this ->dsn = MSSQLConnection::DSN ->value ;
39+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
40+ $ this ->username = MSSQLConnection::USERNAME ->value ;
3841
39- /**
40- * Data Source Name (DSN) for SQL Server connection.
41- */
42- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
43-
44- /**
45- * Password for SQL Server connection.
46- */
47- protected string $ password = 'YourStrong!Passw0rd ' ;
48-
49- /**
50- * Username for SQL Server connection.
51- */
52- protected string $ username = 'SA ' ;
42+ parent ::setUp ();
43+ }
5344}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractQueryBehavior ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for query behavior in nested sets tree behaviors using SQL Server.
3334#[Group('mssql ' )]
3435final class QueryBehaviorTest extends AbstractQueryBehavior
3536{
36- /**
37- * Database driver name for SQL Server.
38- */
39- protected string $ driverName = 'sqlsrv ' ;
37+ protected function setUp (): void
38+ {
39+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
40+ $ this ->dsn = MSSQLConnection::DSN ->value ;
41+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
42+ $ this ->username = MSSQLConnection::USERNAME ->value ;
4043
41- /**
42- * Data Source Name (DSN) for SQL Server connection.
43- */
44- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
45-
46- /**
47- * Password for SQL Server connection.
48- */
49- protected string $ password = 'YourStrong!Passw0rd ' ;
50-
51- /**
52- * Username for SQL Server connection.
53- */
54- protected string $ username = 'SA ' ;
44+ parent ::setUp ();
45+ }
5546}
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \Attributes \Group ;
88use yii2 \extensions \nestedsets \tests \base \AbstractTreeTraversal ;
9+ use yii2 \extensions \nestedsets \tests \support \MSSQLConnection ;
910
1011/**
1112 * Test suite for tree traversal and relationship methods in nested sets tree behaviors using SQL Server.
3132#[Group('mssql ' )]
3233final class TreeTraversalTest extends AbstractTreeTraversal
3334{
34- /**
35- * Database driver name for SQL Server.
36- */
37- protected string $ driverName = 'sqlsrv ' ;
35+ protected function setUp (): void
36+ {
37+ $ this ->driverName = MSSQLConnection::DRIVER_NAME ->value ;
38+ $ this ->dsn = MSSQLConnection::DSN ->value ;
39+ $ this ->password = MSSQLConnection::PASSWORD ->value ;
40+ $ this ->username = MSSQLConnection::USERNAME ->value ;
3841
39- /**
40- * Data Source Name (DSN) for SQL Server connection.
41- */
42- protected string |null $ dsn = 'sqlsrv:Server=127.0.0.1,1433;Database=yiitest;Encrypt=no ' ;
43-
44- /**
45- * Password for SQL Server connection.
46- */
47- protected string $ password = 'YourStrong!Passw0rd ' ;
48-
49- /**
50- * Username for SQL Server connection.
51- */
52- protected string $ username = 'SA ' ;
42+ parent ::setUp ();
43+ }
5344}
You can’t perform that action at this time.
0 commit comments