|
7 | 7 | use PHPUnit\Framework\Attributes\Group; |
8 | 8 | use yii2\extensions\nestedsets\tests\base\AbstractNodeAppend; |
9 | 9 |
|
| 10 | +/** |
| 11 | + * Test suite for node append and root promotion in nested sets tree behaviors using SQL Server. |
| 12 | + * |
| 13 | + * Provides comprehensive unit and integration tests for appending nodes and promoting nodes to root in nested sets tree |
| 14 | + * structures on SQL Server, ensuring correct tree structure, attribute updates, and validation logic for both |
| 15 | + * single-tree and multi-tree models. |
| 16 | + * |
| 17 | + * Inherits tests from {@see AbstractNodeAppend} to validate node append operations, strict validation scenarios, root |
| 18 | + * promotion, and XML dataset matching after structural changes, covering edge cases such as validation bypass, |
| 19 | + * attribute refresh requirements, and cross-tree operations. |
| 20 | + * |
| 21 | + * Key features. |
| 22 | + * - Covers both {@see Tree} and {@see MultipleTree} model scenarios. |
| 23 | + * - Cross-tree append operations for multi-tree models. |
| 24 | + * - Ensures correct left, right, depth, and tree attribute updates for SQL Server. |
| 25 | + * - Root promotion and attribute refresh verification. |
| 26 | + * - Validation of strict and non-strict append operations. |
| 27 | + * - XML dataset matching after structural changes. |
| 28 | + * |
| 29 | + * @see AbstractNodeAppend for test logic and scenarios. |
| 30 | + * |
| 31 | + * @copyright Copyright (C) 2023 Terabytesoftw. |
| 32 | + * @license https://opensource.org/license/bsd-3-clause BSD 3-Clause License. |
| 33 | + */ |
10 | 34 | #[Group('mssql')] |
11 | 35 | final class NodeAppendTest extends AbstractNodeAppend |
12 | 36 | { |
| 37 | + /** |
| 38 | + * Database driver name for SQL Server. |
| 39 | + */ |
13 | 40 | protected string $driverName = 'sqlsrv'; |
| 41 | + |
| 42 | + /** |
| 43 | + * Data Source Name (DSN) for SQL Server connection. |
| 44 | + */ |
14 | 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 | + */ |
15 | 50 | protected string $password = 'YourStrong!Passw0rd'; |
| 51 | + |
| 52 | + /** |
| 53 | + * Username for SQL Server connection. |
| 54 | + */ |
16 | 55 | protected string $username = 'SA'; |
17 | 56 | } |
0 commit comments